Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pixyll Pagination.html broken? #440

Closed
caprinux opened this issue May 24, 2021 · 0 comments
Closed

Pixyll Pagination.html broken? #440

caprinux opened this issue May 24, 2021 · 0 comments

Comments

@caprinux
Copy link

I'm currently using Pixyll theme which runs Jekyll. After writing my 5th post today, I realize 2 issues. Firstly, my homepage starts from older posts rather than newer posts. How do I reverse the pagination?

Secondly, I am unable to navigate through the pages. The newer and older button merely sends me back to my home page.

I am totally lost, please help me out; this is my currently dysfunctional website and my repo is here

This is my current config.yml

# Pagination
paginate:           4
paginate_path:      /page:num/
sass:
  style: compressed
plugins:
  - jekyll-paginate
  - jekyll-sitemap

This is my pagination.html

{% if paginator.total_pages != 1 %}
<div class="pagination clearfix mb1 mt4">
  <div class="left">
    {% if paginator.previous_page %}
      {% if paginator.page == 2 %}
        <a class="pagination-item" href="{{ "/" | relative_url }}">{{ site.text.pagination.newer | default: "Newer" }}</a>
      {% else %}
        <a class="pagination-item" href="{{ paginator.previous_page_path | relative_url }}">{{ site.text.pagination.newer | default: "Older" }}</a>
      {% endif %}
    {% else %}
      <span class="pagination-item disabled">{{ site.text.pagination.newer | default: "Newer" }}</span>
    {% endif %}
  </div>
  <div class="right">
    {% if paginator.next_page %}
      <a class="pagination-item" href="{{ paginator.next_page_path | relative_url }}">{{ site.text.pagination.older | default: "Older" }}</a>
    {% else %}
      <span class="pagination-item disabled">{{ site.text.pagination.older | default: "Older" }}</span>
    {% endif %}
  </div>
  <div class="pagination-meta">Page {{ paginator.page }} of {{ paginator.total_pages }}</div>
</div>
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant