The Paginate V2 plugin will have to work with the notes
collection set by the Digital Garden Jekyll template.
This is just a summary of how I modified the code. For more information please see the GitHub page of the plugin.
-
Add gem "jekyll-paginate-v2"
to Gemfile
, for me it looks like this:.
Remove Gemfile.lock
once. This is automatically created again.
-
Add the following to _config.yml
:
-
Create _includes/pagination.html
and add the following:
-
Create _includes/notes.html
and add the following:
-
Create _includes/pagination-post.html
and add the following:
-
Create _layouts/autopage_category.html
and add the following:
-
Create _layouts/autopage_collection.html
and add the following:
-
Create _layouts/autopage_tags.html
and add the following:
-
Add {% include pagination-post.html %}
to note.html
, so it looks like this:
-
I moved index.md
from the _notes
directory to the root (i.e. wherever _config.yml
is) and renamed the file to index.html
.
Add the following to index.html
:
Don’t forget to add pagination
to the frontmatter of index.html
:
No comments found for this note.
Join the discussion for this note on Github. Comments appear on this page instantly.