default.njk 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. ---
  2. pagination:
  3. data: collections.postlist
  4. size: 12
  5. alias: postsHome
  6. reverse: true
  7. ---
  8. <!DOCTYPE html>
  9. <html lang="en">
  10. <head>
  11. {% include 'head.html' %}
  12. </head>
  13. <body>
  14. {% include 'topbar.html' %}
  15. <div id="tag">
  16. {{ content | safe }}
  17. </div>
  18. <main>
  19. <ul class="postlist">
  20. {% for post in postsHome %}
  21. <li><h3><a href="{{ post.url }}">{{ post.data.title | safe }}</a></h3></li>
  22. {% endfor %}
  23. </ul>
  24. <p class="pagination">
  25. {% if page.url != pagination.href.last %}
  26. <a href="{{ pagination.href.next }}">Prev Page</a>{% endif %} -
  27. {% if page.url != pagination.href.first %}
  28. <a href="{{ pagination.href.previous }}">Next Page</a>{% endif %}
  29. </p>
  30. <!--
  31. <p>Debug Info:</p>
  32. <ul>
  33. <li>Current Page: {{ pagination.pageNumber }}</li>
  34. <li>Next Link: {{ pagination.href.next }}</li>
  35. <li>Previous Link: {{ pagination.href.previous }}</li>
  36. <li>Total Pages: {{ pagination.pages.length }}</li>
  37. </ul>
  38. <h3>Total posts found in collection: {{ collections.postlist.length }}</h3>
  39. <ul>
  40. {% for p in collections.postlist %}
  41. <li>{{ p.inputPath }}</li>
  42. {% endfor %}
  43. </ul>
  44. -->
  45. </main>
  46. <footer class="page-footer">
  47. <small>- {{ site.author }}</small>
  48. </footer>
  49. </body>
  50. </html>