From 9a5a0b8cebefc04e4f2fca719c36ec2ec0414074 Mon Sep 17 00:00:00 2001 From: "gleicher (mac)" Date: Thu, 8 Aug 2024 11:27:53 -0500 Subject: [PATCH] clean up baseof (local) --- build.sh | 2 +- layouts/_default/baseof.html | 47 ++++++++++++++++++++---------------- themes/559Theme | 2 +- 3 files changed, 28 insertions(+), 23 deletions(-) diff --git a/build.sh b/build.sh index db7cab1..6ef9066 100755 --- a/build.sh +++ b/build.sh @@ -1,2 +1,2 @@ -hugo --baseURL https://localhost:1313/public +hugo --baseURL https://localhost:8080/public/ # hugo --baseURL https://pages.graphics.cs.wisc.edu/VisSnacks/ diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index e25e649..96110ff 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -9,28 +9,40 @@ - - {{/* gleicher - add a base href for 404 pages */}} + {{/* gleicher - add a base href for 404 pages {{ if eq .Kind "404" }} - {{ end }} + {{ end }} */}} {{ block "title" . }}{{ if not .IsHome }}{{ .Title }} - {{ end }}{{ .Site.Title }}{{ end }} {{/* this script let's us know that JavaScript is working - it changes the document class from no-js to js if (and only if) js is working */}} - {{ if .Site.Params.opengraph }}{{ template "_internal/opengraph.html" . }}{{ end }} - {{ if .Site.Params.twitter_cards }}{{ template "_internal/twitter_cards.html" . }}{{ end }} + {{- if .Site.Params.opengraph }} + {{ template "_internal/opengraph.html" . }} + {{- end }} + {{- if .Site.Params.schema }} + {{ template "_internal/schema.html" . }} + {{- end }} + {{- if .Site.Params.twitter_cards }} + {{ template "_internal/twitter_cards.html" . }} + {{- end }} + {{/* Fonts Section - modern mainroad has conditionals and variables - we assume we want several google fonts */}} - {{ with .OutputFormats.Get "rss" -}} - {{ printf `` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }} - {{ end -}} - + {{/* include this for mainroad compatibility */}} + {{- $googleFontsLink := .Site.Params.googleFontsLink | default "https://fonts.googleapis.com/css?family=Open+Sans:400,400i,700&display=swap" }} + + + {{- with .OutputFormats.Get "rss" }} + {{ printf `` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }} + {{- end }} + + {{/* CSS section */}} {{/* gleicher - allow for SASS */}} - {{ $style := resources.Get "css/style.scss" | resources.ExecuteAsTemplate "css/style.scss" . | resources.ToCSS -}} + {{- $style := resources.Get "css/style.scss" | resources.ExecuteAsTemplate "css/style.scss" . | resources.ToCSS -}} {{/* gleicher - load the 559 SASS file - so we don't need to have it as a custom */}} {{- $mystyle := resources.Get "css/559.scss" | resources.ExecuteAsTemplate "css/559.scss" . | resources.ToCSS -}} @@ -42,9 +54,7 @@ {{- end -}} - {{/* {{- if not .Site.IsServer }} - {{ template "_internal/google_analytics_async.html" . }} - {{- end }} */}} + {{/* a new redirect feature */}} {{- if isset .Page.Params "redirect" -}} @@ -55,13 +65,8 @@ {{/* gleicher - have a noheader options */}} {{- if isset .Page.Params "noheader" -}} {{- else -}} - {{ partial "header" . }} + {{- block "header" . }}{{ partial "header.html" . }}{{ end }} {{- end -}} -

Debugging Output in Local

-

Base URL: {{ .Site.BaseURL }}

- {{- $testLogo := resources.Get "/svg/crest.svg" }} -

Logo Link RelPermalink: {{ $testLogo.RelPermalink }}

-

Logo Link Permalink: {{ $testLogo.Permalink }}

{{- if isset .Page.Params "redirect" -}} @@ -92,9 +97,9 @@

{{ .Site.Params.archivenote }}

{{ end }} {{ end }}
- {{ partial "sidebar.html" . }} + {{ block "sidebar" . }}{{ partial "sidebar.html" . }}{{ end }}
- {{ partial "footer" . }} + {{ block "footer" . }}{{ partial "footer.html" . }}{{ end }} {{ range .Site.Params.customJS -}} diff --git a/themes/559Theme b/themes/559Theme index 2f88f06..daedd1e 160000 --- a/themes/559Theme +++ b/themes/559Theme @@ -1 +1 @@ -Subproject commit 2f88f06df6e7bad41ab38abcd7ab3ea6b2b63ddc +Subproject commit daedd1e1664dfd9d72a103e8c1bad07b922ba1f8