From 615d2211463e073a65b0de60c61ab1184b14b958 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Wed, 19 Jun 2019 21:18:55 +0200 Subject: theme: Switch to ananke theme --- themes/ananke/layouts/_default/single.html | 55 ++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100755 themes/ananke/layouts/_default/single.html (limited to 'themes/ananke/layouts/_default/single.html') diff --git a/themes/ananke/layouts/_default/single.html b/themes/ananke/layouts/_default/single.html new file mode 100755 index 0000000..fde3f74 --- /dev/null +++ b/themes/ananke/layouts/_default/single.html @@ -0,0 +1,55 @@ +{{ define "header" }} + {{/* We can override any block in the baseof file be defining it in the template */}} + {{ partial "page-header.html" . }} +{{ end }} + +{{ define "main" }} + {{ $section := .Site.GetPage "section" .Section }} +
+ +
+

+ {{/* + CurrentSection allows us to use the section title instead of inferring from the folder. + https://gohugo.io/variables/page/#section-variables-and-methods + */}} + {{with .CurrentSection.Title }}{{. | upper }}{{end}} +

+

+ {{- .Title -}} +

+ {{/* Hugo uses Go's date formatting is set by example. Here are two formats */}} + + {{/* + Show "reading time" and "word count" but only if one of the following are true: + 1) A global config `params` value is set `show_reading_time = true` + 2) A section front matter value is set `show_reading_time = true` + 3) A page front matter value is set `show_reading_time = true` + */}} + {{ if (or (eq (.Param "show_reading_time") true) (eq $section.Params.show_reading_time true) )}} + - {{ .ReadingTime}} minutes read + - {{ .WordCount}} words + {{ end }} +
+ + + + + +
+{{ end }} -- cgit v1.2.3