Skip to content

Ty3uK/obraz-plugin-pagination

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

##Pagination plugin for Obraz.
This plugin creates page.paginator variable for using in index.html template ( every paginated page is a copy of index.html file).
Use Jekyll docs for understanding how to use plugin.

Small tip: use page.paginator instead of paginator from Jekyll. Edited copy/paste from Jekyll docs:

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

Configuration in _config.yml:

paginate: 5 # Posts per page
paginate_path: /blog/page{num}/ # Path for output pages

Requirements:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages