Coder Social home page Coder Social logo

Comments (3)

Yehonal avatar Yehonal commented on June 14, 2024

Hi

You can increase the max number of pages to show by changing the show_wiki_pages_limit in your config file (just keep in mind that the order of the pages there is based on update time)

Alternatively, you can create your sidebar.html with all the page links in there with the order you prefer.

from git-wiki-theme.

chengjun avatar chengjun commented on June 14, 2024

thank you for your reply. following your advice, i would like to see whether i can add pagination into it. thank u.

from git-wiki-theme.

chengjun avatar chengjun commented on June 14, 2024

Solution

The content of the index.html is given as follows:

---
title: Wiki Pages
layout: git-wiki-default
---

<!-- This loops through the paginated posts -->
{% for post in paginator.posts %}
    <div class="post-item">
        <p class="author">
            <span class="date">{{ post.date | date: "%-d %B %Y"}}</span>
        </p>
        <div class="git-wiki-content">
            {{ post.excerpt }}

            <a href="{{ post.url | relative_url }}">...Read all</a>
        </div>
    </div>
    <hr>
{% endfor %}

<!-- Pagination links -->
<div class="pagination">
  {% if paginator.previous_page %}
    <a href="{{ paginator.previous_page_path | relative_url }}" class="previous">
      Previous
    </a>
  {% else %}
    <span class="previous">Previous</span>
  {% endif %}
  <span class="page_number ">
    Page: {{ paginator.page }} of {{ paginator.total_pages }}
  </span>
  {% if paginator.next_page %}
    <a href="{{ paginator.next_page_path | relative_url }}" class="next">Next</a>
  {% else %}
    <span class="next ">Next</span>
  {% endif %}
</div>

from git-wiki-theme.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.