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.
This commit is contained in:
Bill Niblock 2018-01-12 22:49:57 -05:00
parent 1e19017366
commit b0d333c3b9
9 changed files with 129 additions and 4 deletions

View file

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

16
_includes/topics.html Normal file
View file

@ -0,0 +1,16 @@
{% for post in site.posts %}
{% if post.topics contains page.title %}
<div id="posts">
<h1><a href="{{ post.url }}">{{ post.title }}</a></h1>
<div class="" id="details">
<div class="" id="date">{{ post.pub }}</div>
<div class="" id="tags">
{% for topic in post.topics %}
<a href="/topics/{{topic}}.html">{{topic}}</a>
{% endfor %}
</div>
</div>
<div id="desc">{{ post.short_desc }}</div>
</div>
{% endif %}
{% endfor %}

View file

@ -0,0 +1,73 @@
<!DOCTYPE html>
<html>
<head>
<title>The Internet Vagabond :: {{ page.tabtitle }}</title>
<meta name="description"
content="Rants of a wandering techy, in search of truth, knowledge, and a decent ping." />
<meta name="author" content="Bill 'Vagabond Azulien' Nibz" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="{{ site.url }}/src/corrupt.css" />
<link rel="icon" type="image/x-icon" href="{{ site.url }}/src/images/favicon.ico" />
</head>
<body>
<div class="cor_page">
<div class="cor_content">
<div class="cor_head">
<div class="title">
<div>The</div><div>Internet</div><div>Vagabond</div>
</div>
</div>
<div id="content">
<h1>Topic: {{ page.title }}</h1>
{{ content }}
</div>
</div>
<div class="cor_menu">
<div class="" id="tags">
</div>
<div class="cor_footer">
<div class="" id="about">
<h2>The Site</h2>
<p>This site is a small slice of internet real-estate that I use for
occasional writing. Nothing I say is visionary or profound. I
will tend to focus on technology, gaming, and philosophy.</p>
<h2>The Vagabond</h2>
<p>My name is Bill Niblock. I'm a computer scientist by education, a
technologist by trade, a gamer by hobby, and a philosopher by
mistake.</p>
</div>
<div id="social">
<div class="">
<a href="https://github.com/VagabondAzulien">
<img src="{{ site.url }}/src/images/github_light.png"
width="32" height="32" alt="GitHub"
title="My GitHub Repos" />
</a>
</div>
<div class="">
<a href="https://twitter.com/Azulien">
<img src="{{ site.url }}/src/images/twitter_light.png"
width="32" height="32" alt="Twitter"
title="My Twitter Feed" />
</a>
</div>
<div class="">
<a href="https://www.twitch.tv/vagabondazulien/profile">
<img src="{{ site.url }}/src/images/twitch_light.png"
width="32" height="32" alt="Twitch"
title="My Twitch Profile" />
</a>
</div>
<div class="">
<a href="https://steamcommunity.com/id/azulien">
<img src="{{ site.url }}/src/images/steam_light.png"
width="32" height="32" alt="Steam"
title="My Steam Profile" />
</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

5
_topics/gaming.html Normal file
View file

@ -0,0 +1,5 @@
---
title: gaming
---
{% include topics.html %}

5
_topics/other.html Normal file
View file

@ -0,0 +1,5 @@
---
title: other
---
{% include topics.html %}

5
_topics/philosophy.html Normal file
View file

@ -0,0 +1,5 @@
---
title: philosophy
---
{% include topics.html %}

5
_topics/technology.html Normal file
View file

@ -0,0 +1,5 @@
---
title: technology
---
{% include topics.html %}

5
_topics/writing.html Normal file
View file

@ -0,0 +1,5 @@
---
title: writing
---
{% include topics.html %}

View file

@ -7,11 +7,10 @@
<div id="posts">
<h1><a href="{{ post.url }}">{{ post.title }}</a></h1>
<div class="" id="details">
<div class="" id="date">Published: {{ post.pub }}</div>
<div class="" id="date">{{ post.pub }}</div>
<div class="" id="tags">
Tagged:
{% for tag in post.tags %}
{% if forloop.last %} {{tag}}{% else %} {{tag}}, {% endif %}
{% for topic in post.topics %}
<a href="/topics/{{topic}}.html">{{topic}}</a>
{% endfor %}
</div>
</div>