From 2bf3c411beebc24367989ab261f2760f5d1e83f4 Mon Sep 17 00:00:00 2001 From: Riccardo Spagni Date: Sun, 15 Feb 2015 19:42:43 +0200 Subject: [PATCH] blog post tags added --- _data/tags.yml | 39 +++++++++++++++++++++++ _layouts/blog_by_tag.html | 26 +++++++++++++++ _layouts/default.html | 2 +- _layouts/none.html | 10 ++++++ _layouts/post.html | 20 +++++++++++- _layouts/root.html | 2 +- _strings_en.yml | 4 ++- alltags.md | 8 +++++ blog/tags/branding.md | 3 ++ blog/tags/compliance.md | 3 ++ blog/tags/conferences.md | 3 ++ blog/tags/crypto.md | 3 ++ blog/tags/dev diaries.md | 3 ++ blog/tags/docs.md | 3 ++ blog/tags/exchanges.md | 3 ++ blog/tags/gui.md | 3 ++ blog/tags/i2p.md | 3 ++ blog/tags/mining.md | 3 ++ blog/tags/monero missives.md | 3 ++ blog/tags/rpc.md | 3 ++ blog/tags/usability.md | 3 ++ knowledge-base/how-to/use-simplewallet.md | 1 - knowledge-base/vocabulary/vocab.md | 1 - 23 files changed, 146 insertions(+), 6 deletions(-) create mode 100644 _data/tags.yml create mode 100644 _layouts/blog_by_tag.html create mode 100644 _layouts/none.html create mode 100644 alltags.md create mode 100644 blog/tags/branding.md create mode 100644 blog/tags/compliance.md create mode 100644 blog/tags/conferences.md create mode 100644 blog/tags/crypto.md create mode 100644 blog/tags/dev diaries.md create mode 100644 blog/tags/docs.md create mode 100644 blog/tags/exchanges.md create mode 100644 blog/tags/gui.md create mode 100644 blog/tags/i2p.md create mode 100644 blog/tags/mining.md create mode 100644 blog/tags/monero missives.md create mode 100644 blog/tags/rpc.md create mode 100644 blog/tags/usability.md diff --git a/_data/tags.yml b/_data/tags.yml new file mode 100644 index 00000000..6a113c04 --- /dev/null +++ b/_data/tags.yml @@ -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 + diff --git a/_layouts/blog_by_tag.html b/_layouts/blog_by_tag.html new file mode 100644 index 00000000..bc26d42d --- /dev/null +++ b/_layouts/blog_by_tag.html @@ -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 %} + +

{% t tags.all %}: {{ tag.name }}

+
+ {% if site.tags[tag.slug] %} + {% for post in site.tags[tag.slug] %} +

{{ post.title }}

+
+ {{ post.summary }} +
+ {% endfor %} + {% else %} +

There are no posts for this tag.

+ {% endif %} +
+ diff --git a/_layouts/default.html b/_layouts/default.html index 49bc63a1..145bbb12 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -1,5 +1,5 @@ - + {% include head.html %} diff --git a/_layouts/none.html b/_layouts/none.html new file mode 100644 index 00000000..a399d4e7 --- /dev/null +++ b/_layouts/none.html @@ -0,0 +1,10 @@ + + + + + + {{ content }} + + + + diff --git a/_layouts/post.html b/_layouts/post.html index 95ff25b9..5e6d1867 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -1,6 +1,24 @@ --- layout: default --- +{% assign post = page %} +{% if post.tags.size > 0 %} + {% capture tags_content %}Post tags {% if post.tags.size == 1 %}{% else %}{% 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 }}{{ tag.name }}{% if forloop.last == false %}, {% endif %}{% endcapture %} + {% assign tags_content = tags_content_temp %} + {% endif %} + {% endfor %} +{% else %} + {% assign tags_content = '' %} +{% endif %} +

{{ page.title }}

@@ -11,6 +29,6 @@ layout: default
{{ content }}
-
+

{{ tags_content }}

\ No newline at end of file diff --git a/_layouts/root.html b/_layouts/root.html index b6e39ec3..b924495f 100644 --- a/_layouts/root.html +++ b/_layouts/root.html @@ -1,6 +1,6 @@ {% include language_cookie.php %} - + {% include head.html %} diff --git a/_strings_en.yml b/_strings_en.yml index 21cf9b40..06de2b4f 100644 --- a/_strings_en.yml +++ b/_strings_en.yml @@ -86,4 +86,6 @@ blog: title_1: All title_2: Blog title_3: Posts - tagged: Tagged under \ No newline at end of file + tagged: Tagged under +tags: + all: Articles by Tag diff --git a/alltags.md b/alltags.md new file mode 100644 index 00000000..0fe7ef28 --- /dev/null +++ b/alltags.md @@ -0,0 +1,8 @@ +--- +layout: none +--- + +
+{% for post in site.posts %}{% for tag in post.tags %}{{ tag }}
+{% endfor %}{% endfor %}
+
diff --git a/blog/tags/branding.md b/blog/tags/branding.md new file mode 100644 index 00000000..320028d5 --- /dev/null +++ b/blog/tags/branding.md @@ -0,0 +1,3 @@ +--- +layout: blog_by_tag +--- \ No newline at end of file diff --git a/blog/tags/compliance.md b/blog/tags/compliance.md new file mode 100644 index 00000000..320028d5 --- /dev/null +++ b/blog/tags/compliance.md @@ -0,0 +1,3 @@ +--- +layout: blog_by_tag +--- \ No newline at end of file diff --git a/blog/tags/conferences.md b/blog/tags/conferences.md new file mode 100644 index 00000000..320028d5 --- /dev/null +++ b/blog/tags/conferences.md @@ -0,0 +1,3 @@ +--- +layout: blog_by_tag +--- \ No newline at end of file diff --git a/blog/tags/crypto.md b/blog/tags/crypto.md new file mode 100644 index 00000000..320028d5 --- /dev/null +++ b/blog/tags/crypto.md @@ -0,0 +1,3 @@ +--- +layout: blog_by_tag +--- \ No newline at end of file diff --git a/blog/tags/dev diaries.md b/blog/tags/dev diaries.md new file mode 100644 index 00000000..320028d5 --- /dev/null +++ b/blog/tags/dev diaries.md @@ -0,0 +1,3 @@ +--- +layout: blog_by_tag +--- \ No newline at end of file diff --git a/blog/tags/docs.md b/blog/tags/docs.md new file mode 100644 index 00000000..320028d5 --- /dev/null +++ b/blog/tags/docs.md @@ -0,0 +1,3 @@ +--- +layout: blog_by_tag +--- \ No newline at end of file diff --git a/blog/tags/exchanges.md b/blog/tags/exchanges.md new file mode 100644 index 00000000..320028d5 --- /dev/null +++ b/blog/tags/exchanges.md @@ -0,0 +1,3 @@ +--- +layout: blog_by_tag +--- \ No newline at end of file diff --git a/blog/tags/gui.md b/blog/tags/gui.md new file mode 100644 index 00000000..320028d5 --- /dev/null +++ b/blog/tags/gui.md @@ -0,0 +1,3 @@ +--- +layout: blog_by_tag +--- \ No newline at end of file diff --git a/blog/tags/i2p.md b/blog/tags/i2p.md new file mode 100644 index 00000000..320028d5 --- /dev/null +++ b/blog/tags/i2p.md @@ -0,0 +1,3 @@ +--- +layout: blog_by_tag +--- \ No newline at end of file diff --git a/blog/tags/mining.md b/blog/tags/mining.md new file mode 100644 index 00000000..320028d5 --- /dev/null +++ b/blog/tags/mining.md @@ -0,0 +1,3 @@ +--- +layout: blog_by_tag +--- \ No newline at end of file diff --git a/blog/tags/monero missives.md b/blog/tags/monero missives.md new file mode 100644 index 00000000..320028d5 --- /dev/null +++ b/blog/tags/monero missives.md @@ -0,0 +1,3 @@ +--- +layout: blog_by_tag +--- \ No newline at end of file diff --git a/blog/tags/rpc.md b/blog/tags/rpc.md new file mode 100644 index 00000000..320028d5 --- /dev/null +++ b/blog/tags/rpc.md @@ -0,0 +1,3 @@ +--- +layout: blog_by_tag +--- \ No newline at end of file diff --git a/blog/tags/usability.md b/blog/tags/usability.md new file mode 100644 index 00000000..320028d5 --- /dev/null +++ b/blog/tags/usability.md @@ -0,0 +1,3 @@ +--- +layout: blog_by_tag +--- \ No newline at end of file diff --git a/knowledge-base/how-to/use-simplewallet.md b/knowledge-base/how-to/use-simplewallet.md index 6018d426..cbc71f13 100644 --- a/knowledge-base/how-to/use-simplewallet.md +++ b/knowledge-base/how-to/use-simplewallet.md @@ -1,6 +1,5 @@ --- layout: default -translated_name: files.simplewallet --- #How to Use simplewallet diff --git a/knowledge-base/vocabulary/vocab.md b/knowledge-base/vocabulary/vocab.md index b5b0d1f6..429a5faa 100644 --- a/knowledge-base/vocabulary/vocab.md +++ b/knowledge-base/vocabulary/vocab.md @@ -1,6 +1,5 @@ --- layout: default -translated_name: files.vocab --- #Vocab