From dfc78c1bf0215fd693e931a17ffde0c1364c117f Mon Sep 17 00:00:00 2001 From: uvok cheetah Date: Thu, 9 Jan 2020 20:26:40 +0100 Subject: Generate autopages for categories + rename home layout --- _config.yml | 10 ++++++++++ _layouts/home.html | 46 ---------------------------------------------- _layouts/postlist.html | 46 ++++++++++++++++++++++++++++++++++++++++++++++ index.md | 2 +- 4 files changed, 57 insertions(+), 47 deletions(-) delete mode 100644 _layouts/home.html create mode 100644 _layouts/postlist.html diff --git a/_config.yml b/_config.yml index 6469a94..8599915 100644 --- a/_config.yml +++ b/_config.yml @@ -52,3 +52,13 @@ pagination: trail: before: 5 after: 5 + +autopages: + enabled: true + categories: + layouts: ['postlist.html'] + tags: + enabled: false + collections: + enabled: false + diff --git a/_layouts/home.html b/_layouts/home.html deleted file mode 100644 index dd4796e..0000000 --- a/_layouts/home.html +++ /dev/null @@ -1,46 +0,0 @@ ---- -layout: default ---- - -
- {%- if page.title -%} -

{{ page.title }}

- {%- endif -%} - - {{ content }} - - {%- if site.posts.size > 0 -%} - - {% include pagetrail.html %} - -

{{ page.list_title }}

- - - {% include pagetrail.html %} - - {%- endif -%} - -
diff --git a/_layouts/postlist.html b/_layouts/postlist.html new file mode 100644 index 0000000..dd4796e --- /dev/null +++ b/_layouts/postlist.html @@ -0,0 +1,46 @@ +--- +layout: default +--- + +
+ {%- if page.title -%} +

{{ page.title }}

+ {%- endif -%} + + {{ content }} + + {%- if site.posts.size > 0 -%} + + {% include pagetrail.html %} + +

{{ page.list_title }}

+ + + {% include pagetrail.html %} + + {%- endif -%} + +
diff --git a/index.md b/index.md index 0405560..762a33d 100644 --- a/index.md +++ b/index.md @@ -2,7 +2,7 @@ # Feel free to add content and custom Front Matter to this file. # To modify the layout, see https://jekyllrb.com/docs/themes/#overriding-theme-defaults -layout: home +layout: postlist pagination: enabled: true --- -- cgit v1.2.3