diff --git a/config.toml b/config.toml index 05a6576..a2fbb8b 100644 --- a/config.toml +++ b/config.toml @@ -1,11 +1,8 @@ +title = "Website Name" baseURL = 'https://example.org' languageCode = 'en-us' -title = "Website Name" -# [menu] -# [[menu.main]] -# identifier = 'home' -# name = 'Home' -# pre = "🏡" -# url = '/index.html' -# weight = -110 +[params] + #relatedtext = "Related:" + favicon = "/favicon.ico" + stylesheet = "/style.css" diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 7c96144..e00c9cd 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,22 +1,14 @@ {{ partial "header.html" . }} -

{{ .Title }}

-
- {{ .Content }} - -
- {{ partial "footer.html" . }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index c685899..5069e98 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,11 +1,6 @@ {{ partial "header.html" . }} -

{{ with .Params.icon }}{{ end }}{{ .Title }}

-
{{ with .Params.img }}{{ end }} - {{ .Content }} -
- {{ partial "footer.html" . }} diff --git a/layouts/_default/tag.html b/layouts/_default/tag.html index 64f0ed7..59e29ff 100644 --- a/layouts/_default/tag.html +++ b/layouts/_default/tag.html @@ -1,14 +1,9 @@ {{ partial "header.html" . }} -

{{ .Title | title }}

-
- {{ .Content }} -
- {{ partial "footer.html" . }} diff --git a/layouts/index.html b/layouts/index.html index 4115bec..4a588a5 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,7 +1,4 @@ -{{ partial "header.html" . }} - +{{ partial "header.html" . -}}

{{ if .Title }}{{ .Title }}{{ else }}{{ .Site.Title }}{{ end }}

- {{ .Content }} - {{ partial "footer.html" . }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 4f5d215..6d8740e 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,17 +1,20 @@ - {{ if isset .Params "tags" }} - {{ $tagsLen := len .Params.tags }} - {{ if gt $tagsLen 0 }} + {{- if isset .Params "tags" -}} + {{- $tagsLen := len .Params.tags -}} + {{- if gt $tagsLen 0 -}}
- See related:
- {{ range $k, $v := .Params.tags }} - {{ $url := printf "tags/%s" (. | urlize | lower) }} - {{ . | title }} - {{ if lt $k (sub $tagsLen 1) }}·{{ end }} - {{ end }} + {{ with .Site.Params.relatedtext }}{{ . }}
{{ end }} + {{- range $k, $v := .Params.tags -}} + {{- $url := printf "tags/%s" (. | urlize | lower) -}} + {{ . | title }} + {{- if lt $k (sub $tagsLen 1) }}·{{ end -}} + {{- end -}}
- {{ end }} - {{ end }} - - + {{- end -}} + {{- end -}} + + + diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 3ee5728..6137b55 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,16 +1,19 @@ - + {{ if not .IsHome }}{{ .Title | title }} | {{ end }}{{ .Site.Title }} - - - - - - + + {{ with .Site.Params.stylesheet }} + {{ end -}} + {{ with .Site.Params.favicon }} + {{ end -}} - + + + + + - {{ partial "nav.html" . }} -
+{{- partial "nav.html" . -}} +
diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html index dbc93f1..4ffc720 100644 --- a/layouts/partials/nav.html +++ b/layouts/partials/nav.html @@ -1,7 +1,10 @@ +{{- if .Site.Menus.main }} +{{- end }}