+ {% if page.tags.size > 0 %}
+
+ Tags:
+ {% for tag in page.tags %}
+
{{ tag }}
+ {% endfor %}
+
+ {% endif %}
{{ content }}
diff --git a/_layouts/tag_index.html b/_layouts/tag_index.html
new file mode 100644
index 0000000..2a5ffc4
--- /dev/null
+++ b/_layouts/tag_index.html
@@ -0,0 +1,42 @@
+---
+layout: default
+show-avatar: false
+---
+
+
{{page.title}}:
+
+
+ {% for post in site.posts %}
+ {% for tag in post.tags %}
+ {% if tag == page.tag %}
+
+
+ {{ post.title }}
+
+ {% if post.subtitle %}
+
+ {{ post.subtitle }}
+
+ {% endif %}
+
+
+
+ Posted on {{ post.date | date: "%B %-d, %Y" }}
+
+
+
+ {{ post.content | strip_html | xml_escape | truncatewords: 50 }}
+
[Read More]
+
+
+
+ Tags:
+ {% for tag in post.tags %}
+
{{ tag }}
+ {% endfor %}
+
+
+ {% endif %}
+ {% endfor %}
+ {% endfor %}
+
diff --git a/_plugins/_tag_gen.rb b/_plugins/_tag_gen.rb
new file mode 100644
index 0000000..67eeb2a
--- /dev/null
+++ b/_plugins/_tag_gen.rb
@@ -0,0 +1,33 @@
+module Jekyll
+ class TagIndex < Page
+ def initialize(site, base, dir, tag)
+ @site = site
+ @base = base
+ @dir = dir
+ @name = 'index.html'
+ self.process(@name)
+ self.read_yaml(File.join(base, '_layouts'), 'tag_index.html')
+ self.data['tag'] = tag
+ tag_title_prefix = site.config['tag_title_prefix'] || 'Posts Tagged “'
+ tag_title_suffix = site.config['tag_title_suffix'] || '”'
+ self.data['title'] = "#{tag_title_prefix}#{tag}#{tag_title_suffix}"
+ end
+ end
+ class TagGenerator < Generator
+ safe true
+ def generate(site)
+ if site.layouts.key? 'tag_index'
+ dir = site.config['tag_dir'] || 'tag'
+ site.tags.keys.each do |tag|
+ write_tag_index(site, File.join(dir, tag), tag)
+ end
+ end
+ end
+ def write_tag_index(site, dir, tag)
+ index = TagIndex.new(site, site.source, dir, tag)
+ index.render(site.layouts, site.site_payload)
+ index.write(site.dest)
+ site.pages << index
+ end
+ end
+end
diff --git a/_posts/2015-01-04-first-post.md b/_posts/2015-01-04-first-post.md
index 03da58a..6f1c6cb 100644
--- a/_posts/2015-01-04-first-post.md
+++ b/_posts/2015-01-04-first-post.md
@@ -1,6 +1,7 @@
---
layout: post
title: First post!
+tags: [random, exciting-stuff]
---
-This is my first post, how exciting!
\ No newline at end of file
+This is my first post, how exciting!
diff --git a/_posts/2015-01-15-pirates.md b/_posts/2015-01-15-pirates.md
index 0d184d3..545e003 100644
--- a/_posts/2015-01-15-pirates.md
+++ b/_posts/2015-01-15-pirates.md
@@ -1,6 +1,7 @@
---
layout: post
title: Pirates arrrr
+tags: [pirates, random]
---
-Piracy is typically an act of robbery or criminal violence at sea. The term can include acts committed on land, in the air, or in other major bodies of water or on a shore. It does not normally include crimes committed against persons traveling on the same vessel as the perpetrator (e.g. one passenger stealing from others on the same vessel). The term has been used throughout history to refer to raids across land borders by non-state agents.
\ No newline at end of file
+Piracy is typically an act of robbery or criminal violence at sea. The term can include acts committed on land, in the air, or in other major bodies of water or on a shore. It does not normally include crimes committed against persons traveling on the same vessel as the perpetrator (e.g. one passenger stealing from others on the same vessel). The term has been used throughout history to refer to raids across land borders by non-state agents.
diff --git a/_posts/2015-01-27-dear-diary.md b/_posts/2015-01-27-dear-diary.md
index 11b8b4a..9434df3 100644
--- a/_posts/2015-01-27-dear-diary.md
+++ b/_posts/2015-01-27-dear-diary.md
@@ -1,6 +1,7 @@
---
layout: post
title: Dear diary
+tags: [random, diary, school]
---
-What is it with that Mary girl? Dragging me to school every day. As if I had a choice. What you don't hear in those nursery rhymes is that she starves me if I don't go to school with her; it's the only way I can stay alive! I'm thinking about being adopted by Little Bo Peep, sure I may get lost, but anything is better than being with Mary and those little brats at school (shudder, shudder).
\ No newline at end of file
+What is it with that Mary girl? Dragging me to school every day. As if I had a choice. What you don't hear in those nursery rhymes is that she starves me if I don't go to school with her; it's the only way I can stay alive! I'm thinking about being adopted by Little Bo Peep, sure I may get lost, but anything is better than being with Mary and those little brats at school (shudder, shudder).
diff --git a/css/main.css b/css/main.css
index b75cce3..9c8668a 100644
--- a/css/main.css
+++ b/css/main.css
@@ -331,6 +331,34 @@ footer .theme-by {
}
}
+/* --- Tags --- */
+
+.blog-tags {
+ font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
+ color: #999;
+ font-size: 15px;
+ padding-top: 5px;
+ /* margin-bottom: 5px; */
+}
+
+.blog-tags a {
+ /* color: #999; */
+ color: #008AFF;
+ text-decoration: none;
+ padding: 0px 5px;
+}
+
+.blog-tags a:hover {
+ -moz-border-radius-topleft: 2px;
+ -moz-border-radius-topright: 2px;
+ -moz-border-radius-bottomright: 2px;
+ -moz-border-radius-bottomleft: 2px;
+ -webkit-border-radius: 2px 2px 2px 2px;
+ border-radius: 2px 2px 2px 2px;
+ color: #008AFF;
+ background-color: #CCC;
+}
+
/* --- Post and page headers --- */
.intro-header {
diff --git a/index.html b/index.html
index 9893958..da5142d 100644
--- a/index.html
+++ b/index.html
@@ -26,6 +26,14 @@ subtitle: This is where I will tell my friends way too much about me
[Read More]