aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-04-08 21:20:30 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-04-08 21:20:30 +0300
commitc0de650756236c613750302856ba4121b10bf6eb (patch)
tree0f5db3000697ee5b3bfbcd87ec852c8c7076cce2
parentpaginator: fix page 1 link (diff)
downloadjekyll-theme-c0de650756236c613750302856ba4121b10bf6eb.tar.gz
jekyll-theme-c0de650756236c613750302856ba4121b10bf6eb.zip
paginator: add explanatory comments
-rw-r--r--_includes/common/paginator.html8
1 files changed, 8 insertions, 0 deletions
diff --git a/_includes/common/paginator.html b/_includes/common/paginator.html
index d132066..659ea87 100644
--- a/_includes/common/paginator.html
+++ b/_includes/common/paginator.html
@@ -1,4 +1,12 @@
+{% comment %}
+ Page links, inspired by the example at the bottom of
+ https://jekyllrb.com/docs/pagination/.
+{% endcomment %}
{% if site.posts.size != 0 %}
+ {% comment %}
+ Link to page 1 is tricky. If site.paginate_path is used, then we cannot
+ simply use /. This is a silly attempt to get the proper page 1 link.
+ {% endcomment %}
{% if paginator.page == 1 %}
{% assign page1_url = page.url %}
{% else %}