mirror of
https://github.com/mikaela/mikaela.github.io/
synced 2024-11-21 19:49:27 +01:00
Try to add tags
http://www.minddust.com/post/tags-and-categories-on-github-pages/ except step 6 that I don't understand.
This commit is contained in:
parent
a9076623bc
commit
1a0bc9b25d
6
_data/tags.yml
Normal file
6
_data/tags.yml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
- slug: finnish
|
||||||
|
name: in Finnish
|
||||||
|
- slug: english
|
||||||
|
name: in English
|
||||||
|
- slug: irc
|
||||||
|
name: IRC
|
11
_layouts/blog_by_tag.html
Normal file
11
_layouts/blog_by_tag.html
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<h1>Articles by tag :{{ page.tag }}</h1>
|
||||||
|
<div>
|
||||||
|
{% if site.tags[page.tag] %}
|
||||||
|
{% for post in site.tags[page.tag] %}
|
||||||
|
<a href="{{ post.url }}/">{{ post.title }}</a>
|
||||||
|
{% endfor %}
|
||||||
|
{% else %}
|
||||||
|
<p>There are no posts for this tag.</p>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
@ -1,6 +1,22 @@
|
|||||||
---
|
---
|
||||||
layout: default
|
layout: default
|
||||||
---
|
---
|
||||||
|
{% if post.tags.size > 0 %}
|
||||||
|
{% capture tags_content %}Posted with {% if post.tags.size == 1 %}<i class="fa fa-tag"></i>{% else %}<i class="fa fa-tags"></i>{% endif %}: {% endcapture %}
|
||||||
|
{% for post_tag in post.tags %}
|
||||||
|
{% for data_tag in site.data.tags %}
|
||||||
|
{% if data_tag.slug == post_tag %}
|
||||||
|
{% assign tag = data_tag %}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% if tag %}
|
||||||
|
{% capture tags_content_temp %}{{ tags_content }}<a href="/blog/tag/{{ tag.slug }}/">{{ tag.name }}</a>{% if forloop.last == false %}, {% endif %}{% endcapture %}
|
||||||
|
{% assign tags_content = tags_content_temp %}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% else %}
|
||||||
|
{% assign tags_content = '' %}
|
||||||
|
{% endif %}
|
||||||
<div class="post">
|
<div class="post">
|
||||||
|
|
||||||
<header class="post-header">
|
<header class="post-header">
|
||||||
@ -10,6 +26,7 @@ layout: default
|
|||||||
|
|
||||||
<article class="post-content">
|
<article class="post-content">
|
||||||
{{ content }}
|
{{ content }}
|
||||||
|
<p id="post-meta">{{ tags_content }}</p>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
layout: post
|
layout: post
|
||||||
title: Testing...
|
title: Testing...
|
||||||
category: [english]
|
category: [english]
|
||||||
tags: [test, english]
|
tags: [english]
|
||||||
---
|
---
|
||||||
|
|
||||||
It seems that I started trying the blog feature of Jekyll too.
|
It seems that I started trying the blog feature of Jekyll too.
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
layout: post
|
layout: post
|
||||||
title: Kokeilua...
|
title: Kokeilua...
|
||||||
category: [finnish]
|
category: [finnish]
|
||||||
tags: [testi, finnish]
|
tags: [finnish]
|
||||||
---
|
---
|
||||||
|
|
||||||
Vaikuttaa siltä, että aloitin myös Jekyllin bloggaustoiminnon kokeilun.
|
Vaikuttaa siltä, että aloitin myös Jekyllin bloggaustoiminnon kokeilun.
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
layout: post
|
layout: post
|
||||||
title: "Channels & Hostmask groups: A basic Howto"
|
title: "Channels & Hostmask groups: A basic Howto"
|
||||||
category: [english]
|
category: [english]
|
||||||
tags: [oper, irc, groupserv, hostserv]
|
tags: [irc, english]
|
||||||
---
|
---
|
||||||
|
|
||||||
@Annwenn got me opering at her network after long pause with my opering.
|
@Annwenn got me opering at her network after long pause with my opering.
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
layout: post
|
layout: post
|
||||||
title: "Getting help from network operators with channel issues when ops are away"
|
title: "Getting help from network operators with channel issues when ops are away"
|
||||||
category: [english]
|
category: [english]
|
||||||
tags: [oper, irc, groupserv, hostserv]
|
tags: [irc, english]
|
||||||
---
|
---
|
||||||
|
|
||||||
In case you wish network operators to help you when your channel operators
|
In case you wish network operators to help you when your channel operators
|
||||||
|
Loading…
Reference in New Issue
Block a user