From ed86851a73881f386fa4617fe410381aa16f7869 Mon Sep 17 00:00:00 2001 From: Lorenzo Cogotti Date: Tue, 20 Jul 2021 17:39:50 +0200 Subject: [PATCH] [baseof.html,404.html] Add basic meta support --- themes/doublefourteen/layouts/404.html | 5 ++++ .../layouts/_default/baseof.html | 23 ++++++++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/themes/doublefourteen/layouts/404.html b/themes/doublefourteen/layouts/404.html index 6a69c13..0929e42 100644 --- a/themes/doublefourteen/layouts/404.html +++ b/themes/doublefourteen/layouts/404.html @@ -2,6 +2,10 @@ {{ .Title }} ⏎ {{ end }} +{{ define "meta" }} + +{{ end }} + {{ define "links" }} {{ $sassOptions := ( dict "outputStyle" "compressed" ) }} {{ $jsOptions := ( dict "target" "es2018" "minify" true ) }} @@ -11,6 +15,7 @@ {{ $particlesJs := resources.Get "js/lib/particles.js" | js.Build $jsOptions | fingerprint }} {{ end }} + {{ define "main" }} {{ $jsOptions := ( dict "target" "es2018" "minify" true ) }} {{ $rainJs := resources.Get "js/rain.js" | js.Build $jsOptions | fingerprint }} diff --git a/themes/doublefourteen/layouts/_default/baseof.html b/themes/doublefourteen/layouts/_default/baseof.html index 2081e1b..f13d169 100644 --- a/themes/doublefourteen/layouts/_default/baseof.html +++ b/themes/doublefourteen/layouts/_default/baseof.html @@ -7,12 +7,27 @@ - {{ block "title" . }} ⏎ - {{ end }} - {{ .Site.Title }} + {{ block "title" . }} ⏎ {{ end }} {{ .Site.Title }} + {{ if .Params.noindex }} + + {{ else if .Params.noarchive }} + + {{ end }} + {{ if .IsHome }} + {{ with $.Site.Params.description }} + + {{ end }} + {{ else }} + {{ with .Params.description }} + + {{ end }} + {{ end }} + + {{ block "meta" . }} + {{ end }} {{ $sassOptions := ( dict "outputStyle" "compressed" ) }} {{ $styleCss := resources.Get "sass/style.sass" | toCSS $sassOptions | fingerprint }} @@ -20,6 +35,8 @@ {{ $navigationCss := resources.Get "sass/navigation.sass" | toCSS $sassOptions | fingerprint }} + + {{ block "links" . }} {{ end }}