Build a beautiful and simple website in literally minutes. Demo at http://deanattali.com/beautiful-jekyll
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
2.0 KiB

9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
9 years ago
  1. ---
  2. layout: page
  3. title: My website
  4. subtitle: This is where I will tell my friends way too much about me
  5. ---
  6. <div class="posts-list">
  7. {% for post in paginator.posts %}
  8. <article class="post-preview">
  9. <a href="{{ post.url | prepend: site.baseurl }}">
  10. <h2 class="post-title">{{ post.title }}</h2>
  11. {% if post.subtitle %}
  12. <h3 class="post-subtitle">
  13. {{ post.subtitle }}
  14. </h3>
  15. {% endif %}
  16. </a>
  17. <p class="post-meta">
  18. Posted on {{ post.date | date: "%B %-d, %Y" }}
  19. </p>
  20. <div class="post-entry-container">
  21. {% if post.image %}
  22. <div class="post-image">
  23. <a href="{{ post.url | prepend: site.baseurl }}">
  24. <img src="{{ post.image }}">
  25. </a>
  26. </div>
  27. {% endif %}
  28. <div class="post-entry">
  29. {{ post.excerpt | strip_html | xml_escape | truncatewords: site.excerpt_length }}
  30. {% assign excerpt_word_count = post.excerpt | number_of_words %}
  31. {% if post.content != post.excerpt or excerpt_word_count > site.excerpt_length %}
  32. <a href="{{ post.url | prepend: site.baseurl }}" class="post-read-more">[Read&nbsp;More]</a>
  33. {% endif %}
  34. </div>
  35. </div>
  36. {% if post.tags.size > 0 %}
  37. <div class="blog-tags">
  38. Tags:
  39. {% if site.link-tags %}
  40. {% for tag in post.tags %}
  41. <a href="{{ site.baseurl }}/tag/{{ tag }}">{{ tag }}</a>
  42. {% endfor %}
  43. {% else %}
  44. {{ post.tags | join: ", " }}
  45. {% endif %}
  46. </div>
  47. {% endif %}
  48. </article>
  49. {% endfor %}
  50. </div>
  51. {% if paginator.total_pages > 1 %}
  52. <ul class="pager main-pager">
  53. {% if paginator.previous_page %}
  54. <li class="previous">
  55. <a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">&larr; Newer Posts</a>
  56. </li>
  57. {% endif %}
  58. {% if paginator.next_page %}
  59. <li class="next">
  60. <a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}">Older Posts &rarr;</a>
  61. </li>
  62. {% endif %}
  63. </ul>
  64. {% endif %}