implemented pagination

This commit is contained in:
2023-08-09 02:21:58 +03:00
parent 9e3931e5e2
commit afa446d39a
3 changed files with 21 additions and 3 deletions
+15 -2
View File
@@ -2,6 +2,19 @@
title = "Contact"
description = "Let's get in touch."
+++
You can find me on GitHub as [@andwati]. To email me andwatiian at gmail domain dot com.
# Find me on:
[@andwati]: https://github.com/andwati
- Github : https://github.com/andwati
![Github contribution graph](https://ghchart.rshah.org/andwati)
- Stack Overflow : https://stackoverflow.com/users/12246264/ian
![Stack Overflow info](https://stackoverflow-card.vercel.app/?userID=12246264&theme=solarized-light)
- Twitter : https://twitter.com/andwati_
- Email : andwatiian@gmail.com
- stackoverflow : "https://stackoverflow.com/users/12246264/ian"
- linkedin : "https://linkedin.com/in/andwati"
+1
View File
@@ -4,4 +4,5 @@ template = "posts.html"
page_template = "post.html"
sort_by = "date"
insert_anchor_links = "left"
paginate_by= 5
+++
+5 -1
View File
@@ -5,7 +5,11 @@
<header>
<h1>Posts</h1>
</header>
{% for page in section.pages %}{{ post_macros::snippet(page=page) }}{% endfor %}
{% for page in paginator.pages %}{{ post_macros::snippet(page=page) }}{% endfor %}
<nav>
{% if paginator.previous %}<a href="{{ paginator.previous }}" class="previous">Previous</a>{% endif %}
{% if paginator.next %}<a href="{{ paginator.next }}" class="next">Next</a>{% endif %}
</nav>
</main>
{% include "footer.html" %}
{% endblock content %}