From e0c319bb64af4abe0f2b078d1f53ea3adcab4381 Mon Sep 17 00:00:00 2001 From: Anshul Chauhan Date: Wed, 1 Jun 2016 01:25:23 +0530 Subject: [PATCH 1/2] Added pagination --- _config.yml | 7 ++++++- _sass/_default.scss | 10 +++++++++- index.html | 20 ++++++++++++++++++-- 3 files changed, 33 insertions(+), 4 deletions(-) diff --git a/_config.yml b/_config.yml index 7aa24384..c81e2978 100644 --- a/_config.yml +++ b/_config.yml @@ -1,4 +1,6 @@ -# Site settings +gems: [jekyll-paginate] + + # Site settings title: Daktilo description: > Write an awesome description for your new site here. You can edit this @@ -27,3 +29,6 @@ exclude: ["README.md", "README.html"] # Build settings highlighter: null markdown: kramdown + +paginate: 5 +paginate_path: "/page:num" diff --git a/_sass/_default.scss b/_sass/_default.scss index a22d4740..0013ee61 100644 --- a/_sass/_default.scss +++ b/_sass/_default.scss @@ -302,4 +302,12 @@ strong { .post-title__subtitle { font-size: 18px; } -} \ No newline at end of file +} + +.pagination { + font-size: 14px; + padding: 0px; + text-align: center; + position: relative; + +} diff --git a/index.html b/index.html index 5197b6b5..b0cbf2be 100644 --- a/index.html +++ b/index.html @@ -7,12 +7,28 @@ --- From 0d2cdb40bc0cee7b3d66a812f42b8fd2f5f33de2 Mon Sep 17 00:00:00 2001 From: Anshul Chauhan Date: Sat, 4 Jun 2016 14:36:52 +0530 Subject: [PATCH 2/2] Added paginate usage --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 24db0c1e..ef66f672 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ Daktilo is a [Jekyll](jekyllrb.com) theme with a minimal design inspired from ty # How to use it Start by cloning the repository, then check the `_config.yml` file and change it accordingly. Note that the `title` property is what will be displayed as logo. +Change the `num` in `paginate:num` to see the number of posts on one page. Finally execute `jekyll serve --watch` and head to [localhost:4000](http://127.0.0.1:4000) to see the result.