mirror of
https://github.com/kremalicious/blog.git
synced 2025-02-14 21:10:25 +01:00
category pages through one template
This commit is contained in:
parent
35652e32dd
commit
144c9f8ced
14
_config.yml
14
_config.yml
@ -57,6 +57,20 @@ gems:
|
||||
- jekyll-picture-tag
|
||||
- jekyll-archives
|
||||
|
||||
|
||||
# jekyll-archives
|
||||
# --------------------
|
||||
|
||||
jekyll-archives:
|
||||
enabled:
|
||||
- categories
|
||||
- tags
|
||||
layout: 'archive'
|
||||
permalinks:
|
||||
tag: '/tag/:name/'
|
||||
category: '/:name/'
|
||||
|
||||
|
||||
# jekyll-picture-tag
|
||||
# --------------------
|
||||
|
||||
|
29
_src/_layouts/archive.html
Normal file
29
_src/_layouts/archive.html
Normal file
@ -0,0 +1,29 @@
|
||||
---
|
||||
layout: base
|
||||
---
|
||||
|
||||
<section role="main" id="main" class="row">
|
||||
|
||||
{% if page.type == 'category' %}
|
||||
<h1 class="page-title icon icon-{{ page.title }}">{{ page.title }}</h1>
|
||||
{% else %}
|
||||
<h1 class="page-title">{{ page.type }} archive for {{ page.title }}</h1>
|
||||
{% endif %}
|
||||
|
||||
{% if page.title == 'photos' %}
|
||||
<div class="masonry">
|
||||
<div class="grid-sizer"></div>
|
||||
{% endif %}
|
||||
|
||||
{% for post in page.posts %}
|
||||
{% include articles.html %}
|
||||
{% endfor %}
|
||||
|
||||
{% if page.title == 'photos' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
{% include paginator.html %}
|
@ -3,7 +3,7 @@
|
||||
|
||||
{% capture id %}{{ page.url | replace:'/','-' | replace_first:'-','' | replace:'.html','' | replace:'-index','' }}{% endcapture %}
|
||||
|
||||
<body class="page-{{ id }}">
|
||||
<body class="page-{{ id | remove:'-' }}">
|
||||
|
||||
{% include header.html %}
|
||||
|
||||
|
@ -1,21 +0,0 @@
|
||||
---
|
||||
layout: base
|
||||
title: Design
|
||||
description: All the design related articles, mostly about web/ui design & front-end development
|
||||
category: design
|
||||
redirect_from:
|
||||
- /topics/design-articles/
|
||||
- /design-articles/
|
||||
---
|
||||
|
||||
<section role="main" id="main" class="row">
|
||||
|
||||
<h1 class="page-title icon icon-{{ page.category }}">{{ page.category }}</h1>
|
||||
|
||||
{% for post in site.categories.design %}
|
||||
{% include articles.html %}
|
||||
{% endfor %}
|
||||
|
||||
</section>
|
||||
|
||||
{% include paginator.html %}
|
@ -1,23 +0,0 @@
|
||||
---
|
||||
layout: base
|
||||
title: Goodies
|
||||
description: All the goodies I've released for you to download. Those are all free for your personal use only, licensed under CC BY NC SA 3.0. Please contact me if you want to use them commercially.
|
||||
category: goodies
|
||||
redirect_from:
|
||||
- /goodies/icon/
|
||||
- /goodies/other/
|
||||
- /goodies/wallpaper/
|
||||
- /topics/goodies/
|
||||
---
|
||||
|
||||
<section role="main" id="main" class="row">
|
||||
|
||||
<h1 class="page-title icon icon-{{ page.category }}">{{ page.category }}</h1>
|
||||
|
||||
{% for post in site.categories.goodies %}
|
||||
{% include articles.html %}
|
||||
{% endfor %}
|
||||
|
||||
</section>
|
||||
|
||||
{% include paginator.html %}
|
@ -1,17 +0,0 @@
|
||||
---
|
||||
layout: base
|
||||
title: Personal
|
||||
category: personal
|
||||
---
|
||||
|
||||
<section role="main" id="main" class="row">
|
||||
|
||||
<h1 class="page-title icon icon-{{ page.category }}">{{ page.category }}</h1>
|
||||
|
||||
{% for post in site.categories.personal %}
|
||||
{% include articles.html %}
|
||||
{% endfor %}
|
||||
|
||||
</section>
|
||||
|
||||
{% include paginator.html %}
|
@ -1,17 +0,0 @@
|
||||
---
|
||||
layout: base
|
||||
title: Photography
|
||||
category: photography
|
||||
---
|
||||
|
||||
<section role="main" id="main" class="row">
|
||||
|
||||
<h1 class="page-title icon icon-{{ page.category }}">{{ page.category }}</h1>
|
||||
|
||||
{% for post in site.categories.photography %}
|
||||
{% include articles.html %}
|
||||
{% endfor %}
|
||||
|
||||
</section>
|
||||
|
||||
{% include paginator.html %}
|
@ -1,23 +0,0 @@
|
||||
---
|
||||
layout: base
|
||||
title: Photos
|
||||
description: My photo posts aggregated from various sources. You can find more of my photography on 500px and Flickr.
|
||||
category: photos
|
||||
---
|
||||
|
||||
<section role="main" id="main" class="row">
|
||||
|
||||
<h1 class="page-title icon icon-photos">photos</h1>
|
||||
|
||||
<div class="masonry">
|
||||
<div class="grid-sizer"></div>
|
||||
|
||||
{% for post in site.categories.photos %}
|
||||
{% include articles.html %}
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
{% include paginator.html %}
|
Loading…
x
Reference in New Issue
Block a user