At ‘jekyllrb dot com slash docs slash paginationslash #enable-pagination’ the second code snippet has errors with its link to the first page. I’m not sure if this is where to discuss this issue, so please direct me elsewhere if needed.
Short version:
replace
{% elsif page == 1 %}
{{ page }}
{% else %}
with this:
{% elsif page == 1 %}
{{ page }}
{% else %}
Longer discussion here: jakescruggs dot com slash blog slash 2018 slash 09 slash 09 slash moving-to-github-pages-with-jekyll-and-fixing-a-pagination-bug
-Jake