clean target added in Makefile + more natual pagination

This commit is contained in:
ahmadbilalkhalid 2019-11-18 19:36:27 +05:00
parent ffa3141648
commit 604f8d17c0
2 changed files with 11 additions and 2 deletions

View File

@ -15,3 +15,6 @@ permissions: build
build:
lektor build -O $(BUILDDIR)
clean:
rm -rf $(BUILDDIR)

View File

@ -5,10 +5,16 @@
{% else %}
<span class="disabled">&laquo; Previous</span>
{% endif %} |
{{ pagination.page }} |
{% for page in range(pagination.page + 1, pagination.pages + 1)[:5] %}
{% for page in range(1, pagination.pages + 1) %}
{% if page != pagination.page %}
<a href="{{ pagination.for_page(page)|url }}">{{ page }}</a> |
{% else %}
{{ pagination.page }} |
{% endif %}
{% endfor %}
{% if pagination.has_next %}
<a href="{{ pagination.next|url }}">Next &raquo;</a>
{% else %}