diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2023-12-19 23:27:48 +0100 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2023-12-19 23:27:48 +0100 |
commit | ebf28f08194e295dde7cdb61f75c107a614a64f1 (patch) | |
tree | e5b53fd6ad7fc5d90618d50cfc6ca64a47db8c67 /layouts/_default | |
parent | 9618ecd791a264b966fbb0285a4d8fecc2ed601b (diff) |
Update defaults
Diffstat (limited to 'layouts/_default')
-rw-r--r-- | layouts/_default/list.html | 25 | ||||
-rw-r--r-- | layouts/_default/single.html | 8 |
2 files changed, 20 insertions, 13 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index b6a63be..601fc08 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,11 +1,20 @@ -{{ partial "header.html" . -}} -<header><h1 id="tag_{{ .Title }}">{{ .Title | title }}</h1></header> -<article> -{{ .Content -}} +{{ define "title" -}} +{{ .Title | title }} +{{- end }} +{{ define "main" -}} +{{ .Content }} <ul> {{- range.Pages }} - <li><time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006 Jan 02" }}</time> – <a href="{{ .RelPermalink }}">{{ .Title }}</a></li> -{{ end -}} +<li> + {{- if .Param "datesinlist" }}<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006 Jan 02" }}</time> – {{ end -}} + <a href="{{ .RelPermalink }}">{{ .Title }}</a> + {{- if .Param "authorsinlist" }} + {{ with .Params.authors }} + by + {{ delimit . ", " " and " }} + {{end}} + {{ end -}} +</li> +{{- end }} </ul> -</article> -{{- partial "footer.html" . }} +{{- end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 43e8c2a..f65a7d8 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,5 +1,3 @@ -{{ partial "header.html" . -}} -<header><h1>{{ .Title }}</h1></header> -<article> -{{ .Content -}} -{{ partial "footer.html" . }} +{{ define "title" }} +{{ .Title }} +{{ end }} |