edavis10 (owner)

Revisions

gist: 227621 Download_button fork
public
Description:
Pagination in Jekyll
Public Clone URL: git://gist.github.com/227621.git
Embed All Files: show embed
_config.yml #
1
2
# ....other stuff here
paginate: 10
_includes/single_page.html #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
  <h2 class="title"><a href="{{ page.url }}">{{ page.title }}</a></h2>
  <div class="post post-{{ page.id }}">
 
    <p class="author">
      Added by {{ page.author }}
      on {{ page.date | date: '%B %d, %Y' }}
      in {% for category in page.categories %}
       <a href="/{{category | downcase}}.html">{{category}}</a>
      {% endfor %}
    </p>
 
    <hr />
    
    <div class="entrybody">
      {{ page.content }}
    </div>
  </div>
 
index.html #
1
2
3
4
{% for page in paginator.posts %}
  {% include single_page.html %}
{% endfor %}