commit 87a1b94d5a45bda1dcc17a2242a686b33319d676
parent 971bb816650b98cdd60adb995a4dd5f6e04bb63a
Author: Shimmy Xu <shimmy.america@gmail.com>
Date: Sun, 10 Sep 2017 12:52:17 -0500
Added categories and tags link to single pages.
Diffstat:
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/content/posts/2017-08-31-hello-world.en.org b/content/posts/2017-08-31-hello-world.en.org
@@ -10,5 +10,5 @@ categories = ["Site Related"
slug = "hello world"
+++
+* Hello world!
Hello world!
-
diff --git a/content/posts/2017-08-31-hello-world.zh.org b/content/posts/2017-08-31-hello-world.zh.org
@@ -10,5 +10,5 @@ categories = ["Site Related"
slug = "hello world"
+++
+* 你好世界!
你好世界!
-
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
@@ -3,7 +3,13 @@
<h1><span class="title">{{ .Title }}</span></h1>
{{ with .Params.author }}<h2 class="author">{{ . }}</h2>{{ end }}
{{ if .Params.date }}<h2 class="date">{{ .Date.Format "2006/01/02" }}</h2>{{ end }}
-<!-- {{ with .Params.description }}<h4 class="description">{{ . }}</h4>{{ end }} -->
+<p class="terms">
+ {{ range $i := (slice "categories" "tags") }}
+ {{ with ($.Param $i) }}
+ {{ i18n ($i | title) }}: {{ range $k := . }}<a href="{{ relURL (print "/" $.Site.Language.Lang "/" $i "/" $k | urlize) }}">{{i18n $k}}</a> {{ end }}
+ {{ end }}
+ {{ end }}
+</p>
</div>
<main>