From eaaff9e2cf95bd05e0554bed2996b3e8252edba7 Mon Sep 17 00:00:00 2001 From: tdro Date: Sat, 13 Jan 2024 20:33:21 -0500 Subject: themes/default/layouts/partials: base -> head --- themes/default/layouts/_default/baseof.html | 8 +-- themes/default/layouts/_default/home.archives.html | 2 +- themes/default/layouts/_default/home.settings.html | 2 +- themes/default/layouts/_default/home.xslt.rss.xsl | 2 +- .../default/layouts/_default/home.xslt.sitemap.xsl | 2 +- themes/default/layouts/_default/index.html | 2 +- themes/default/layouts/_default/rss.xml | 4 +- .../default/layouts/_default/section.drafts.html | 2 +- themes/default/layouts/_default/section.feeds.html | 2 +- themes/default/layouts/_default/section.html | 2 +- themes/default/layouts/_default/section.marks.html | 2 +- themes/default/layouts/_default/single.embed.html | 2 +- themes/default/layouts/_default/taxonomy.html | 2 +- themes/default/layouts/_default/term.html | 2 +- .../default/layouts/partials/base-canonical.html | 15 ----- themes/default/layouts/partials/base-csp.html | 19 ------ themes/default/layouts/partials/base-css.html | 18 ------ .../default/layouts/partials/base-description.html | 8 --- .../default/layouts/partials/base-discovery.html | 62 ------------------- themes/default/layouts/partials/base-embed.html | 4 -- themes/default/layouts/partials/base-footer.html | 14 ----- themes/default/layouts/partials/base-head.html | 72 ---------------------- themes/default/layouts/partials/base-js.html | 8 --- themes/default/layouts/partials/base-manifest.html | 58 ----------------- themes/default/layouts/partials/base-search.html | 5 -- themes/default/layouts/partials/base-title.html | 20 ------ themes/default/layouts/partials/footer.html | 14 +++++ .../default/layouts/partials/head-canonical.html | 15 +++++ themes/default/layouts/partials/head-csp.html | 19 ++++++ themes/default/layouts/partials/head-css.html | 18 ++++++ .../default/layouts/partials/head-description.html | 8 +++ .../default/layouts/partials/head-discovery.html | 62 +++++++++++++++++++ themes/default/layouts/partials/head-embed.html | 4 ++ themes/default/layouts/partials/head-js.html | 8 +++ themes/default/layouts/partials/head-manifest.html | 58 +++++++++++++++++ themes/default/layouts/partials/head-search.html | 5 ++ themes/default/layouts/partials/head-title.html | 20 ++++++ themes/default/layouts/partials/head.html | 72 ++++++++++++++++++++++ 38 files changed, 321 insertions(+), 321 deletions(-) delete mode 100644 themes/default/layouts/partials/base-canonical.html delete mode 100644 themes/default/layouts/partials/base-csp.html delete mode 100644 themes/default/layouts/partials/base-css.html delete mode 100644 themes/default/layouts/partials/base-description.html delete mode 100644 themes/default/layouts/partials/base-discovery.html delete mode 100644 themes/default/layouts/partials/base-embed.html delete mode 100644 themes/default/layouts/partials/base-footer.html delete mode 100644 themes/default/layouts/partials/base-head.html delete mode 100644 themes/default/layouts/partials/base-js.html delete mode 100644 themes/default/layouts/partials/base-manifest.html delete mode 100644 themes/default/layouts/partials/base-search.html delete mode 100644 themes/default/layouts/partials/base-title.html create mode 100644 themes/default/layouts/partials/footer.html create mode 100644 themes/default/layouts/partials/head-canonical.html create mode 100644 themes/default/layouts/partials/head-csp.html create mode 100644 themes/default/layouts/partials/head-css.html create mode 100644 themes/default/layouts/partials/head-description.html create mode 100644 themes/default/layouts/partials/head-discovery.html create mode 100644 themes/default/layouts/partials/head-embed.html create mode 100644 themes/default/layouts/partials/head-js.html create mode 100644 themes/default/layouts/partials/head-manifest.html create mode 100644 themes/default/layouts/partials/head-search.html create mode 100644 themes/default/layouts/partials/head-title.html create mode 100644 themes/default/layouts/partials/head.html (limited to 'themes/default/layouts') diff --git a/themes/default/layouts/_default/baseof.html b/themes/default/layouts/_default/baseof.html index fa386be..c277115 100644 --- a/themes/default/layouts/_default/baseof.html +++ b/themes/default/layouts/_default/baseof.html @@ -18,10 +18,10 @@ {{- block "title" . -}}{{- end -}} - {{- partial "base-title.html" . -}} + {{- partial "head-title.html" . -}} - - {{- partial "base-head.html" . -}} + + {{- partial "head.html" . -}} {{- block "styles" . -}}{{- end -}} @@ -41,7 +41,7 @@ {{- end -}} {{- block "footer" . -}} - {{- partial "base-footer.html" . -}} + {{- partial "footer.html" . -}} {{- end -}} diff --git a/themes/default/layouts/_default/home.archives.html b/themes/default/layouts/_default/home.archives.html index d098a21..f443583 100644 --- a/themes/default/layouts/_default/home.archives.html +++ b/themes/default/layouts/_default/home.archives.html @@ -59,7 +59,7 @@ {{- define "footer" -}} {{- partial "pagination.html" . -}} - {{- partial "base-footer.html" . -}} + {{- partial "footer.html" . -}} {{- end -}} {{- define "right" -}} diff --git a/themes/default/layouts/_default/home.settings.html b/themes/default/layouts/_default/home.settings.html index 44b3399..84e8080 100644 --- a/themes/default/layouts/_default/home.settings.html +++ b/themes/default/layouts/_default/home.settings.html @@ -24,7 +24,7 @@ {{- end -}} {{- define "footer" -}} - {{- partial "base-footer.html" . -}} + {{- partial "footer.html" . -}} {{- end -}} {{- define "right" -}} diff --git a/themes/default/layouts/_default/home.xslt.rss.xsl b/themes/default/layouts/_default/home.xslt.rss.xsl index 9d5e8ee..f828f4f 100644 --- a/themes/default/layouts/_default/home.xslt.rss.xsl +++ b/themes/default/layouts/_default/home.xslt.rss.xsl @@ -13,7 +13,7 @@ {{ printf `<xsl:value-of select="/rss/channel/title" /> Web Feed` | safeHTML }} - {{- partial "base-css.html" . -}} + {{- partial "head-css.html" . -}} diff --git a/themes/default/layouts/_default/home.xslt.sitemap.xsl b/themes/default/layouts/_default/home.xslt.sitemap.xsl index 67a4459..335ce09 100644 --- a/themes/default/layouts/_default/home.xslt.sitemap.xsl +++ b/themes/default/layouts/_default/home.xslt.sitemap.xsl @@ -11,7 +11,7 @@ {{ $.Site.Title }} Site Map - {{- partial "base-css.html" . -}} + {{- partial "head-css.html" . -}} diff --git a/themes/default/layouts/_default/index.html b/themes/default/layouts/_default/index.html index 1de28d6..f25cabf 100644 --- a/themes/default/layouts/_default/index.html +++ b/themes/default/layouts/_default/index.html @@ -26,7 +26,7 @@ {{- define "footer" -}} {{- partial "pagination.html" . -}} - {{- partial "base-footer.html" . -}} + {{- partial "footer.html" . -}} {{- end -}} {{- define "right" -}} diff --git a/themes/default/layouts/_default/rss.xml b/themes/default/layouts/_default/rss.xml index 78161da..5f9877e 100644 --- a/themes/default/layouts/_default/rss.xml +++ b/themes/default/layouts/_default/rss.xml @@ -14,8 +14,8 @@ {{- $lastBuildDate = .Date | time.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML -}} {{- end -}} -{{- $title := partial "base-title.html" . -}} -{{- $description := partial "base-title.html" . -}} +{{- $title := partial "head-title.html" . -}} +{{- $description := partial "head-title.html" . -}} {{- $author := partial "function-authors-data.html" . -}} {{- if (eq .Page.Kind "section") -}} diff --git a/themes/default/layouts/_default/section.drafts.html b/themes/default/layouts/_default/section.drafts.html index 7a2cdf6..bb7485c 100644 --- a/themes/default/layouts/_default/section.drafts.html +++ b/themes/default/layouts/_default/section.drafts.html @@ -50,7 +50,7 @@ {{- define "footer" -}} {{- partial "pagination.html" . -}} - {{- partial "base-footer.html" . -}} + {{- partial "footer.html" . -}} {{- end -}} {{- define "right" -}} diff --git a/themes/default/layouts/_default/section.feeds.html b/themes/default/layouts/_default/section.feeds.html index 406f667..e239928 100644 --- a/themes/default/layouts/_default/section.feeds.html +++ b/themes/default/layouts/_default/section.feeds.html @@ -45,7 +45,7 @@ {{- define "footer" -}} {{- partial "pagination.html" . -}} - {{- partial "base-footer.html" . -}} + {{- partial "footer.html" . -}} {{- end -}} {{- define "right" -}} diff --git a/themes/default/layouts/_default/section.html b/themes/default/layouts/_default/section.html index 4de0f9c..901ca1f 100644 --- a/themes/default/layouts/_default/section.html +++ b/themes/default/layouts/_default/section.html @@ -48,7 +48,7 @@ {{- define "footer" -}} {{- partial "pagination.html" . -}} - {{- partial "base-footer.html" . -}} + {{- partial "footer.html" . -}} {{- end -}} {{- define "right" -}} diff --git a/themes/default/layouts/_default/section.marks.html b/themes/default/layouts/_default/section.marks.html index 5b6cea0..def6c94 100644 --- a/themes/default/layouts/_default/section.marks.html +++ b/themes/default/layouts/_default/section.marks.html @@ -50,7 +50,7 @@ {{- define "footer" -}} {{- partial "pagination.html" . -}} - {{- partial "base-footer.html" . -}} + {{- partial "footer.html" . -}} {{- end -}} {{- define "right" -}} diff --git a/themes/default/layouts/_default/single.embed.html b/themes/default/layouts/_default/single.embed.html index 6169772..73a3add 100644 --- a/themes/default/layouts/_default/single.embed.html +++ b/themes/default/layouts/_default/single.embed.html @@ -21,6 +21,6 @@ {{- end -}} {{- if $modified -}} - {{- partial "base-embed.html" . -}} + {{- partial "head-embed.html" . -}} {{- .Render "summary" -}} {{- end -}} diff --git a/themes/default/layouts/_default/taxonomy.html b/themes/default/layouts/_default/taxonomy.html index 6a8325b..5c8e2ba 100644 --- a/themes/default/layouts/_default/taxonomy.html +++ b/themes/default/layouts/_default/taxonomy.html @@ -63,7 +63,7 @@ {{- define "footer" -}} {{- partial "pagination.html" . -}} - {{- partial "base-footer.html" . -}} + {{- partial "footer.html" . -}} {{- end -}} {{- define "right" -}} diff --git a/themes/default/layouts/_default/term.html b/themes/default/layouts/_default/term.html index 6455b40..4f0d92a 100644 --- a/themes/default/layouts/_default/term.html +++ b/themes/default/layouts/_default/term.html @@ -26,7 +26,7 @@ {{- define "footer" -}} {{- partial "pagination.html" . -}} - {{- partial "base-footer.html" . -}} + {{- partial "footer.html" . -}} {{- end -}} {{- define "right" -}} diff --git a/themes/default/layouts/partials/base-canonical.html b/themes/default/layouts/partials/base-canonical.html deleted file mode 100644 index 051e450..0000000 --- a/themes/default/layouts/partials/base-canonical.html +++ /dev/null @@ -1,15 +0,0 @@ -{{- $canonical := .Permalink -}} - -{{- with .Site.Params.site.canonical -}} - {{- $canonical = print $.Site.Params.site.canonical $.RelPermalink -}} -{{- end -}} - -{{- with .Params.feed -}} - {{- $canonical = $.Params.feed.link -}} -{{- end -}} - -{{- with .Params.canonical -}} - {{- $canonical = $.Params.canonical -}} -{{- end -}} - - diff --git a/themes/default/layouts/partials/base-csp.html b/themes/default/layouts/partials/base-csp.html deleted file mode 100644 index d34043e..0000000 --- a/themes/default/layouts/partials/base-csp.html +++ /dev/null @@ -1,19 +0,0 @@ - - - -{{ with .Site.Params.csp -}} - -{{ end -}} diff --git a/themes/default/layouts/partials/base-css.html b/themes/default/layouts/partials/base-css.html deleted file mode 100644 index 662aa6b..0000000 --- a/themes/default/layouts/partials/base-css.html +++ /dev/null @@ -1,18 +0,0 @@ -{{- $default := resources.Get "css/default.css" -}} -{{- $syntax := resources.Get "css/default-syntax.css" -}} -{{- $simple := resources.Get "css/default-simple.css" -}} - -{{- $css := - slice $default $syntax | - resources.Concat "css/bundle.css" | - resources.Minify | - fingerprint | --}} - -{{ if .Site.Params.site.production }} - -{{ else }} - - - -{{ end }} diff --git a/themes/default/layouts/partials/base-description.html b/themes/default/layouts/partials/base-description.html deleted file mode 100644 index 94b10c2..0000000 --- a/themes/default/layouts/partials/base-description.html +++ /dev/null @@ -1,8 +0,0 @@ -{{- if .Params.summary -}} - {{ .Params.summary }} -{{- else if .Summary -}} - {{ .Summary }} -{{- else -}} - {{- block "description" . -}}{{- end -}} - {{- partial "base-title.html" . -}} -{{- end -}} diff --git a/themes/default/layouts/partials/base-discovery.html b/themes/default/layouts/partials/base-discovery.html deleted file mode 100644 index 8c7272f..0000000 --- a/themes/default/layouts/partials/base-discovery.html +++ /dev/null @@ -1,62 +0,0 @@ -{{- $author := partial "function-authors-data.html" . -}} - -{{- with (eq .Page.Kind "home") -}} - - - {{- range $author := $.Site.Sections }} - - {{ end }} -{{- end -}} - -{{- with (eq .Page.Kind "section") -}} - - -{{- with $author.feeds.rss }} - {{ range $author.feeds.rss }} - {{ $data := split . " " }} - {{- $url := delimit (first 1 $data) "" -}} - {{- $retitle := trim (delimit (after 1 $data) " ") " " -}} - {{- $retitle := and $retitle (print $retitle "'s Feed") -}} - - - {{ end }} -{{ end }} -{{- end -}} - -{{- with (eq .Page.Kind "taxonomy") -}} - -{{- end -}} - -{{- with (eq .Page.Kind "term") -}} - -{{- end }} diff --git a/themes/default/layouts/partials/base-embed.html b/themes/default/layouts/partials/base-embed.html deleted file mode 100644 index c6f3174..0000000 --- a/themes/default/layouts/partials/base-embed.html +++ /dev/null @@ -1,4 +0,0 @@ - - - {{- partial "base-css.html" . -}} - diff --git a/themes/default/layouts/partials/base-footer.html b/themes/default/layouts/partials/base-footer.html deleted file mode 100644 index cae0cbf..0000000 --- a/themes/default/layouts/partials/base-footer.html +++ /dev/null @@ -1,14 +0,0 @@ -{{- $kind := in (slice "home" "taxonomy" "term") .Page.Kind -}} -{{- $author := index .Site.Data.authors .Section -}} - - diff --git a/themes/default/layouts/partials/base-head.html b/themes/default/layouts/partials/base-head.html deleted file mode 100644 index a32b08d..0000000 --- a/themes/default/layouts/partials/base-head.html +++ /dev/null @@ -1,72 +0,0 @@ -{{- $noindex := "" -}} -{{- $image := "" -}} -{{- $author := .Section -}} -{{- $kind := in (slice "home" "taxonomy" "term") .Page.Kind -}} - -{{- if not $kind -}} - {{- $image = print ("" | absURL) "/data/media/" $author "/" $author "-profile.png" -}} -{{- end -}} - -{{- with or .Params.Feed .Params.Unlisted .Params.ExpiryDate -}} - {{- $noindex = "noindex,nofollow" -}} -{{- end }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{{- partial "base-search.html" . -}} - - -{{- partial "base-discovery.html" . -}} - - -{{- partial "base-canonical.html" . -}} - - -{{- partial "base-css.html" . -}} - - -{{- partial "base-js.html" . -}} - - -{{- partial "base-manifest.html" . -}} - - -{{- partial "base-csp.html" . -}} - - - diff --git a/themes/default/layouts/partials/base-js.html b/themes/default/layouts/partials/base-js.html deleted file mode 100644 index a491eee..0000000 --- a/themes/default/layouts/partials/base-js.html +++ /dev/null @@ -1,8 +0,0 @@ -{{- $index := resources.Get "js/index.js" -}} -{{- $js := $index | resources.Minify | fingerprint -}} - -{{ if .Site.Params.site.production }} - -{{ else }} - -{{ end }} diff --git a/themes/default/layouts/partials/base-manifest.html b/themes/default/layouts/partials/base-manifest.html deleted file mode 100644 index 52be1f9..0000000 --- a/themes/default/layouts/partials/base-manifest.html +++ /dev/null @@ -1,58 +0,0 @@ -{{- $author := .Section -}} -{{- $home := or ("" | absURL) "/" -}} -{{- $kind := in (slice "home" "taxonomy" "term") .Page.Kind -}} -{{- $logo := .Site.Params.webmanifest.logo -}} -{{- $profile := print "public/data/media/" $author "/" $author "-profile" -}} - -{{- if not $kind -}} - {{- $home = print ("" | absURL) "/" $author "/" -}} - {{- if fileExists (print $profile ".gif") -}} {{- $logo = (print $profile ".gif") -}} {{- end -}} - {{- if fileExists (print $profile ".webp") -}} {{- $logo = (print $profile ".webp") -}} {{- end -}} - {{- if fileExists (print $profile ".png") -}} {{- $logo = (print $profile ".png") -}} {{- end -}} -{{- end -}} - -{{- with $logo = resources.Get $logo -}} - -{{- $16 := $logo.Fit "16x16" -}} -{{- $32 := $logo.Fit "32x32" -}} -{{- $180 := $logo.Fit "180x180" -}} -{{- $192 := $logo.Fit "192x192" -}} -{{- $512 := $logo.Fit "512x512" -}} - -{{- if (eq $.Page.Kind "home") -}} - {{- $writeToFile := ($32.Content | resources.FromString "/favicon.ico").Permalink -}} -{{- end -}} - - - - - - - - -{{ "" -}} - -{{- with $manifest := $.Site.Params.webmanifest -}} - - - - - - - - -{{- end -}} -{{- end -}} diff --git a/themes/default/layouts/partials/base-search.html b/themes/default/layouts/partials/base-search.html deleted file mode 100644 index 89113ab..0000000 --- a/themes/default/layouts/partials/base-search.html +++ /dev/null @@ -1,5 +0,0 @@ -{{- with .Site.Params.search.verification -}} -{{- range $name, $content := . }} - -{{- end }} -{{ end }} diff --git a/themes/default/layouts/partials/base-title.html b/themes/default/layouts/partials/base-title.html deleted file mode 100644 index fff4530..0000000 --- a/themes/default/layouts/partials/base-title.html +++ /dev/null @@ -1,20 +0,0 @@ -{{- $author := index .Site.Data.authors .Section -}} - -{{- if not (eq .Title $.Site.Title) -}} - {{- with $title := or .Title .Summary -}} - {{ $title }} — - {{ end }} -{{- end -}} - -{{- with $title := $.Site.Title -}} - {{- if (in (slice - "home" - "taxonomy" - "term" - ) $.Page.Kind) - -}} - {{ $title }} - {{- else -}} - {{ $author.title }} - {{- end -}} -{{- end -}} diff --git a/themes/default/layouts/partials/footer.html b/themes/default/layouts/partials/footer.html new file mode 100644 index 0000000..cae0cbf --- /dev/null +++ b/themes/default/layouts/partials/footer.html @@ -0,0 +1,14 @@ +{{- $kind := in (slice "home" "taxonomy" "term") .Page.Kind -}} +{{- $author := index .Site.Data.authors .Section -}} + + diff --git a/themes/default/layouts/partials/head-canonical.html b/themes/default/layouts/partials/head-canonical.html new file mode 100644 index 0000000..051e450 --- /dev/null +++ b/themes/default/layouts/partials/head-canonical.html @@ -0,0 +1,15 @@ +{{- $canonical := .Permalink -}} + +{{- with .Site.Params.site.canonical -}} + {{- $canonical = print $.Site.Params.site.canonical $.RelPermalink -}} +{{- end -}} + +{{- with .Params.feed -}} + {{- $canonical = $.Params.feed.link -}} +{{- end -}} + +{{- with .Params.canonical -}} + {{- $canonical = $.Params.canonical -}} +{{- end -}} + + diff --git a/themes/default/layouts/partials/head-csp.html b/themes/default/layouts/partials/head-csp.html new file mode 100644 index 0000000..d34043e --- /dev/null +++ b/themes/default/layouts/partials/head-csp.html @@ -0,0 +1,19 @@ + + + +{{ with .Site.Params.csp -}} + +{{ end -}} diff --git a/themes/default/layouts/partials/head-css.html b/themes/default/layouts/partials/head-css.html new file mode 100644 index 0000000..662aa6b --- /dev/null +++ b/themes/default/layouts/partials/head-css.html @@ -0,0 +1,18 @@ +{{- $default := resources.Get "css/default.css" -}} +{{- $syntax := resources.Get "css/default-syntax.css" -}} +{{- $simple := resources.Get "css/default-simple.css" -}} + +{{- $css := + slice $default $syntax | + resources.Concat "css/bundle.css" | + resources.Minify | + fingerprint | +-}} + +{{ if .Site.Params.site.production }} + +{{ else }} + + + +{{ end }} diff --git a/themes/default/layouts/partials/head-description.html b/themes/default/layouts/partials/head-description.html new file mode 100644 index 0000000..89e4691 --- /dev/null +++ b/themes/default/layouts/partials/head-description.html @@ -0,0 +1,8 @@ +{{- if .Params.summary -}} + {{ .Params.summary }} +{{- else if .Summary -}} + {{ .Summary }} +{{- else -}} + {{- block "description" . -}}{{- end -}} + {{- partial "head-title.html" . -}} +{{- end -}} diff --git a/themes/default/layouts/partials/head-discovery.html b/themes/default/layouts/partials/head-discovery.html new file mode 100644 index 0000000..8c7272f --- /dev/null +++ b/themes/default/layouts/partials/head-discovery.html @@ -0,0 +1,62 @@ +{{- $author := partial "function-authors-data.html" . -}} + +{{- with (eq .Page.Kind "home") -}} + + + {{- range $author := $.Site.Sections }} + + {{ end }} +{{- end -}} + +{{- with (eq .Page.Kind "section") -}} + + +{{- with $author.feeds.rss }} + {{ range $author.feeds.rss }} + {{ $data := split . " " }} + {{- $url := delimit (first 1 $data) "" -}} + {{- $retitle := trim (delimit (after 1 $data) " ") " " -}} + {{- $retitle := and $retitle (print $retitle "'s Feed") -}} + + + {{ end }} +{{ end }} +{{- end -}} + +{{- with (eq .Page.Kind "taxonomy") -}} + +{{- end -}} + +{{- with (eq .Page.Kind "term") -}} + +{{- end }} diff --git a/themes/default/layouts/partials/head-embed.html b/themes/default/layouts/partials/head-embed.html new file mode 100644 index 0000000..e9c44d7 --- /dev/null +++ b/themes/default/layouts/partials/head-embed.html @@ -0,0 +1,4 @@ + + + {{- partial "head-css.html" . -}} + diff --git a/themes/default/layouts/partials/head-js.html b/themes/default/layouts/partials/head-js.html new file mode 100644 index 0000000..a491eee --- /dev/null +++ b/themes/default/layouts/partials/head-js.html @@ -0,0 +1,8 @@ +{{- $index := resources.Get "js/index.js" -}} +{{- $js := $index | resources.Minify | fingerprint -}} + +{{ if .Site.Params.site.production }} + +{{ else }} + +{{ end }} diff --git a/themes/default/layouts/partials/head-manifest.html b/themes/default/layouts/partials/head-manifest.html new file mode 100644 index 0000000..52be1f9 --- /dev/null +++ b/themes/default/layouts/partials/head-manifest.html @@ -0,0 +1,58 @@ +{{- $author := .Section -}} +{{- $home := or ("" | absURL) "/" -}} +{{- $kind := in (slice "home" "taxonomy" "term") .Page.Kind -}} +{{- $logo := .Site.Params.webmanifest.logo -}} +{{- $profile := print "public/data/media/" $author "/" $author "-profile" -}} + +{{- if not $kind -}} + {{- $home = print ("" | absURL) "/" $author "/" -}} + {{- if fileExists (print $profile ".gif") -}} {{- $logo = (print $profile ".gif") -}} {{- end -}} + {{- if fileExists (print $profile ".webp") -}} {{- $logo = (print $profile ".webp") -}} {{- end -}} + {{- if fileExists (print $profile ".png") -}} {{- $logo = (print $profile ".png") -}} {{- end -}} +{{- end -}} + +{{- with $logo = resources.Get $logo -}} + +{{- $16 := $logo.Fit "16x16" -}} +{{- $32 := $logo.Fit "32x32" -}} +{{- $180 := $logo.Fit "180x180" -}} +{{- $192 := $logo.Fit "192x192" -}} +{{- $512 := $logo.Fit "512x512" -}} + +{{- if (eq $.Page.Kind "home") -}} + {{- $writeToFile := ($32.Content | resources.FromString "/favicon.ico").Permalink -}} +{{- end -}} + + + + + + + + +{{ "" -}} + +{{- with $manifest := $.Site.Params.webmanifest -}} + + + + + + + + +{{- end -}} +{{- end -}} diff --git a/themes/default/layouts/partials/head-search.html b/themes/default/layouts/partials/head-search.html new file mode 100644 index 0000000..89113ab --- /dev/null +++ b/themes/default/layouts/partials/head-search.html @@ -0,0 +1,5 @@ +{{- with .Site.Params.search.verification -}} +{{- range $name, $content := . }} + +{{- end }} +{{ end }} diff --git a/themes/default/layouts/partials/head-title.html b/themes/default/layouts/partials/head-title.html new file mode 100644 index 0000000..fff4530 --- /dev/null +++ b/themes/default/layouts/partials/head-title.html @@ -0,0 +1,20 @@ +{{- $author := index .Site.Data.authors .Section -}} + +{{- if not (eq .Title $.Site.Title) -}} + {{- with $title := or .Title .Summary -}} + {{ $title }} — + {{ end }} +{{- end -}} + +{{- with $title := $.Site.Title -}} + {{- if (in (slice + "home" + "taxonomy" + "term" + ) $.Page.Kind) + -}} + {{ $title }} + {{- else -}} + {{ $author.title }} + {{- end -}} +{{- end -}} diff --git a/themes/default/layouts/partials/head.html b/themes/default/layouts/partials/head.html new file mode 100644 index 0000000..0d0fb32 --- /dev/null +++ b/themes/default/layouts/partials/head.html @@ -0,0 +1,72 @@ +{{- $noindex := "" -}} +{{- $image := "" -}} +{{- $author := .Section -}} +{{- $kind := in (slice "home" "taxonomy" "term") .Page.Kind -}} + +{{- if not $kind -}} + {{- $image = print ("" | absURL) "/data/media/" $author "/" $author "-profile.png" -}} +{{- end -}} + +{{- with or .Params.Feed .Params.Unlisted .Params.ExpiryDate -}} + {{- $noindex = "noindex,nofollow" -}} +{{- end }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{{- partial "head-search.html" . -}} + + +{{- partial "head-discovery.html" . -}} + + +{{- partial "head-canonical.html" . -}} + + +{{- partial "head-css.html" . -}} + + +{{- partial "head-js.html" . -}} + + +{{- partial "head-manifest.html" . -}} + + +{{- partial "head-csp.html" . -}} + + + -- cgit v1.2.3