blog post tags added

This commit is contained in:
Riccardo Spagni 2015-02-15 19:42:43 +02:00
parent 4ec19024d0
commit 2bf3c411be
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD
23 changed files with 146 additions and 6 deletions

39
_data/tags.yml Normal file
View file

@ -0,0 +1,39 @@
- slug: monero missives
name: Monero Missives
- slug: conferences
name: Conferences
- slug: exchanges
name: Exchanges
- slug: gui
name: Monero Core GUI
- slug: usability
name: Usability
- slug: dev diaries
name: Dev Diaries
- slug: mining
name: Mining
- slug: i2p
name: i2p
- slug: rpc
name: RPC API
- slug: docs
name: Documentation
- slug: branding
name: Branding and Graphics
- slug: compliance
name: Standards Compliance
- slug: crypto
name: Cryptography

26
_layouts/blog_by_tag.html Normal file
View file

@ -0,0 +1,26 @@
---
layout: default
---
{% assign filename = page.path | remove: '.md' | split: '/' | last %}
{% for data_tag in site.data.tags %}
{% if data_tag.slug == filename %}
{% assign tag = data_tag %}
{% endif %}
{% endfor %}
<h1>{% t tags.all %}: <span class="kicks">{{ tag.name }}</span></h1>
<div>
{% if site.tags[tag.slug] %}
{% for post in site.tags[tag.slug] %}
<h3><a href="{{ post.url }}">{{ post.title }}</a></h3>
<blockquote>
{{ post.summary }}
</blockquote>
{% endfor %}
{% else %}
<h3>There are no posts for this tag.</h3>
{% endif %}
</div>

View file

@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html>
{% include head.html %} {% include head.html %}

10
_layouts/none.html Normal file
View file

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<body>
{{ content }}
</body>
</html>

View file

@ -1,6 +1,24 @@
--- ---
layout: default layout: default
--- ---
{% assign post = page %}
{% if post.tags.size > 0 %}
{% capture tags_content %}Post tags {% 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/tags/{{ tag.slug }}">{{ tag.name }}</a>{% if forloop.last == false %}, {% endif %}{% endcapture %}
{% assign tags_content = tags_content_temp %}
{% endif %}
{% endfor %}
{% else %}
{% assign tags_content = '' %}
{% endif %}
<article> <article>
<header> <header>
<h2>{{ page.title }}</h2> <h2>{{ page.title }}</h2>
@ -11,6 +29,6 @@ layout: default
<div class="entry">{{ content }}</div> <div class="entry">{{ content }}</div>
<footer><!-- additional info --></footer> <footer><p id="post-meta">{{ tags_content }}</p></footer>
</article> </article>

View file

@ -1,6 +1,6 @@
{% include language_cookie.php %} {% include language_cookie.php %}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html>
{% include head.html %} {% include head.html %}

View file

@ -87,3 +87,5 @@ blog:
title_2: Blog title_2: Blog
title_3: Posts title_3: Posts
tagged: Tagged under tagged: Tagged under
tags:
all: Articles by Tag

8
alltags.md Normal file
View file

@ -0,0 +1,8 @@
---
layout: none
---
<pre>
{% for post in site.posts %}{% for tag in post.tags %}{{ tag }}
{% endfor %}{% endfor %}
</pre>

3
blog/tags/branding.md Normal file
View file

@ -0,0 +1,3 @@
---
layout: blog_by_tag
---

3
blog/tags/compliance.md Normal file
View file

@ -0,0 +1,3 @@
---
layout: blog_by_tag
---

3
blog/tags/conferences.md Normal file
View file

@ -0,0 +1,3 @@
---
layout: blog_by_tag
---

3
blog/tags/crypto.md Normal file
View file

@ -0,0 +1,3 @@
---
layout: blog_by_tag
---

3
blog/tags/dev diaries.md Normal file
View file

@ -0,0 +1,3 @@
---
layout: blog_by_tag
---

3
blog/tags/docs.md Normal file
View file

@ -0,0 +1,3 @@
---
layout: blog_by_tag
---

3
blog/tags/exchanges.md Normal file
View file

@ -0,0 +1,3 @@
---
layout: blog_by_tag
---

3
blog/tags/gui.md Normal file
View file

@ -0,0 +1,3 @@
---
layout: blog_by_tag
---

3
blog/tags/i2p.md Normal file
View file

@ -0,0 +1,3 @@
---
layout: blog_by_tag
---

3
blog/tags/mining.md Normal file
View file

@ -0,0 +1,3 @@
---
layout: blog_by_tag
---

View file

@ -0,0 +1,3 @@
---
layout: blog_by_tag
---

3
blog/tags/rpc.md Normal file
View file

@ -0,0 +1,3 @@
---
layout: blog_by_tag
---

3
blog/tags/usability.md Normal file
View file

@ -0,0 +1,3 @@
---
layout: blog_by_tag
---

View file

@ -1,6 +1,5 @@
--- ---
layout: default layout: default
translated_name: files.simplewallet
--- ---
#How to Use simplewallet #How to Use simplewallet

View file

@ -1,6 +1,5 @@
--- ---
layout: default layout: default
translated_name: files.vocab
--- ---
#Vocab #Vocab