1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-12-23 01:30:01 +01:00

category pages through one template

This commit is contained in:
Matthias Kretschmann 2015-06-07 22:15:03 +02:00
parent 35652e32dd
commit 144c9f8ced
8 changed files with 52 additions and 110 deletions

View File

@ -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
# --------------------

View 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 %}

View File

@ -1,24 +1,24 @@
{% include head.html %}
{% capture id %}{{ page.url | replace:'/','-' | replace_first:'-','' | replace:'.html','' | replace:'-index','' }}{% endcapture %}
<body class="page-{{ id }}">
<body class="page-{{ id | remove:'-' }}">
{% include header.html %}
<section role="document" class="document container">
<section role="document" class="document container">
{{ content }}
</section>
<div class="popover container hide">
<div class="row">
<div class="search-results"></div>
</div>
</div>
</body>
{% include footer.html %}
{% include footer.html %}

View File

@ -1,21 +0,0 @@
---
layout: base
title: Design
description: All the design related articles, mostly about web/ui design &amp; 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 %}

View File

@ -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 %}

View File

@ -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 %}

View File

@ -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 %}

View File

@ -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 %}