diff --git a/README.md b/README.md index 6437df9..812599b 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ paginate = 10 dateform = "Jan 2, 2006" dateformShort = "Jan 2" dateformNum = "2006-01-02" - dateformNumTime = "2006-01-02 15:04 -0700" + dateformNumTime = "2006-01-02 15:04" # Subtitle for home homeSubtitle = "A simple and beautiful blog" diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 8a8585f..9de6227 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -51,7 +51,7 @@ disableHugoGeneratorInject = false dateform = "Jan 2, 2006" dateformShort = "Jan 2" dateformNum = "2006-01-02" - dateformNumTime = "2006-01-02 15:04 -0700" + dateformNumTime = "2006-01-02 15:04" # Metadata mostly used in document's head # diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 5275c6b..c5c04c0 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -14,14 +14,14 @@

{{ .Title | markdownify }}

- {{- if .Params.toc }} + {{ if .Params.toc }}

- {{- end }} + {{ end }} {{ with .Params.Cover }} @@ -35,14 +35,8 @@
- {{- with .Params.tags }} -

- - {{- range . -}} - {{.}} - {{- end }} -

- {{- end }} + {{ partial "tags.html" . }} + {{ partial "categories.html" . }} {{- if .GitInfo }}

{{ .GitInfo.AbbreviatedHash }} @ {{ if .Site.Params.dateformNum }}{{ dateFormat .Site.Params.dateformNum .GitInfo.AuthorDate.Local }}{{ else }}{{ dateFormat "2006-01-02" .GitInfo.AuthorDate.Local }}{{ end }}

diff --git a/layouts/partials/categories.html b/layouts/partials/categories.html new file mode 100644 index 0000000..e3b5b16 --- /dev/null +++ b/layouts/partials/categories.html @@ -0,0 +1,9 @@ +{{ with .Params.categories }} +

+ + + {{ range . -}} + {{.}} + {{ end }} +

+{{ end }} \ No newline at end of file diff --git a/layouts/partials/tags.html b/layouts/partials/tags.html new file mode 100644 index 0000000..c78403d --- /dev/null +++ b/layouts/partials/tags.html @@ -0,0 +1,9 @@ +{{ with .Params.tags }} +

+ + + {{ range . -}} + {{.}} + {{ end }} +

+{{ end }} \ No newline at end of file diff --git a/layouts/posts/single.html b/layouts/posts/single.html index 631bb36..6a17c01 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -43,18 +43,8 @@