From b0d333c3b9465505ca0501bb50e1b18419b1aeb3 Mon Sep 17 00:00:00 2001 From: Bill Niblock Date: Fri, 12 Jan 2018 22:49:57 -0500 Subject: [PATCH] Impmenent tagging By creating a collection of "topics", I can suppliment a tagging system, albeit less automated. However, in the interest of minimizing "tag bloat", I feel having a limited number of tags (topics) is not a problem. --- _config.yml | 12 ++++++ _includes/topics.html | 16 +++++++ _layouts/corrupt_collection.html | 73 ++++++++++++++++++++++++++++++++ _topics/gaming.html | 5 +++ _topics/other.html | 5 +++ _topics/philosophy.html | 5 +++ _topics/technology.html | 5 +++ _topics/writing.html | 5 +++ index.html | 7 ++- 9 files changed, 129 insertions(+), 4 deletions(-) create mode 100644 _includes/topics.html create mode 100644 _layouts/corrupt_collection.html create mode 100644 _topics/gaming.html create mode 100644 _topics/other.html create mode 100644 _topics/philosophy.html create mode 100644 _topics/technology.html create mode 100644 _topics/writing.html diff --git a/_config.yml b/_config.yml index 1f9f862..fddc782 100644 --- a/_config.yml +++ b/_config.yml @@ -1,7 +1,19 @@ +collections: + topics: + output: true + defaults: - scope: + path: '' type: "posts" values: layout: "corrupt_post" author: "Bill Niblock" + - + scope: + path: '' + type: "topics" + values: + layout: "corrupt_collection" + permalink: "/topics/:name" diff --git a/_includes/topics.html b/_includes/topics.html new file mode 100644 index 0000000..8b9a412 --- /dev/null +++ b/_includes/topics.html @@ -0,0 +1,16 @@ +{% for post in site.posts %} + {% if post.topics contains page.title %} +
+

{{ post.title }}

+
+
{{ post.pub }}
+
+ {% for topic in post.topics %} + {{topic}} + {% endfor %} +
+
+
{{ post.short_desc }}
+
+ {% endif %} +{% endfor %} diff --git a/_layouts/corrupt_collection.html b/_layouts/corrupt_collection.html new file mode 100644 index 0000000..2f39c71 --- /dev/null +++ b/_layouts/corrupt_collection.html @@ -0,0 +1,73 @@ + + + + The Internet Vagabond :: {{ page.tabtitle }} + + + + + + + +
+
+
+
+
The
Internet
Vagabond
+
+
+
+

Topic: {{ page.title }}

+ {{ content }} +
+
+
+
+
+ +
+
+ + diff --git a/_topics/gaming.html b/_topics/gaming.html new file mode 100644 index 0000000..4e837ae --- /dev/null +++ b/_topics/gaming.html @@ -0,0 +1,5 @@ +--- + title: gaming +--- + +{% include topics.html %} diff --git a/_topics/other.html b/_topics/other.html new file mode 100644 index 0000000..7c03a13 --- /dev/null +++ b/_topics/other.html @@ -0,0 +1,5 @@ +--- + title: other +--- + +{% include topics.html %} diff --git a/_topics/philosophy.html b/_topics/philosophy.html new file mode 100644 index 0000000..99e479f --- /dev/null +++ b/_topics/philosophy.html @@ -0,0 +1,5 @@ +--- + title: philosophy +--- + +{% include topics.html %} diff --git a/_topics/technology.html b/_topics/technology.html new file mode 100644 index 0000000..b4f108a --- /dev/null +++ b/_topics/technology.html @@ -0,0 +1,5 @@ +--- + title: technology +--- + +{% include topics.html %} diff --git a/_topics/writing.html b/_topics/writing.html new file mode 100644 index 0000000..d485df2 --- /dev/null +++ b/_topics/writing.html @@ -0,0 +1,5 @@ +--- + title: writing +--- + +{% include topics.html %} diff --git a/index.html b/index.html index ba68c99..1dfb6b8 100644 --- a/index.html +++ b/index.html @@ -7,11 +7,10 @@

{{ post.title }}

-
Published: {{ post.pub }}
+
{{ post.pub }}
- Tagged: - {% for tag in post.tags %} - {% if forloop.last %} {{tag}}{% else %} {{tag}}, {% endif %} + {% for topic in post.topics %} + {{topic}} {% endfor %}