From a90f0d369e4c05ff5c023c63ef7a780476afe379 Mon Sep 17 00:00:00 2001 From: Tyler Hallada Date: Thu, 24 Jul 2014 11:45:52 -0400 Subject: [PATCH] Add pagination to the blog --- _config.yml | 2 ++ blog/index.html | 18 +++++++++++++++++- css/main.css | 5 +++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index af4c1b6..88bdb66 100644 --- a/_config.yml +++ b/_config.yml @@ -1,3 +1,5 @@ name: Tyler Hallada - Blog markdown: redcarpet pygments: true +paginate: 10 +paginate_path: "blog/page:num" diff --git a/blog/index.html b/blog/index.html index 6db1eec..471d0f6 100644 --- a/blog/index.html +++ b/blog/index.html @@ -3,7 +3,7 @@ layout: default title: Tyler Hallada - Blog --- -{% for post in site.posts %} +{% for post in paginator.posts %}
@@ -25,3 +25,19 @@ title: Tyler Hallada - Blog
{% endfor %} + + diff --git a/css/main.css b/css/main.css index dc3f57f..8c96802 100755 --- a/css/main.css +++ b/css/main.css @@ -207,6 +207,11 @@ div.more-row { padding-top: 5px; } +div.pagination { + text-align: center; + margin-bottom: 10px; +} + /*****************************************************************************/ /* /* Posts