Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gyorb/hugo-dusk.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGyorgy Orban <o.gyorgy@gmail.com>2019-08-31 16:10:03 +0300
committerGyorgy Orban <o.gyorgy@gmail.com>2019-08-31 16:11:35 +0300
commitf3a7cee246b1c08eb05d4fa7dade1a3620024ccf (patch)
treea5486b09a17deef179eab1e6a04e137e40e27fa6
parentdab9ebed047b61020958ae4fac8b0e4ead41a6d6 (diff)
[WIP] inroduce new post header with author and categoriesnew-post-header
-rw-r--r--layouts/_default/single.html3
-rw-r--r--layouts/partials/postheader.html12
2 files changed, 14 insertions, 1 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 8e33633..a568213 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,7 +1,8 @@
{{ partial "header.html" . }}
+
<article class="post">
- <h1 class="title"> {{ .Title }} </h1>
+ {{ partial "postheader.html" . }}
<div class="content"> {{ .Content }} </div>
{{ partial "postfooter.html" . }}
</article>
diff --git a/layouts/partials/postheader.html b/layouts/partials/postheader.html
new file mode 100644
index 0000000..1584dd5
--- /dev/null
+++ b/layouts/partials/postheader.html
@@ -0,0 +1,12 @@
+<h1 class="title"> {{ .Title }} </h1>
+
+{{ .Site.Author.name }}, {{ .Date.Format "2 Jan 2006" }}
+
+{{ if .Params.categories }}
+ on
+ {{ range .Params.categories }}
+ <div class="tag">
+ <a href="/categories/{{ . | urlize }}">{{.}}</a>
+ </div>
+ {{ end }}
+{{ end }}