Update theme

This commit is contained in:
Bjørn Erik Pedersen 2022-12-20 17:08:57 +01:00
parent 808aee6f64
commit 4e66d98adf
No known key found for this signature in database
GPG Key ID: 330E6E2BD4859D8F
4 changed files with 109 additions and 63 deletions

View File

@ -1,75 +1,119 @@
<!DOCTYPE html> <!DOCTYPE html>
<html class="no-js" lang="{{ with $.Site.LanguageCode }}{{ . }}{{ else }}en-us{{ end }}"> <html
class="no-js"
<head> lang="{{ with $.Site.LanguageCode }}
<meta charset="utf-8"> {{ . }}
{{/* https://www.zachleat.com/web/preload/ */}}
<link rel="preload" href="{{ "fonts/muli-latin-200.woff2" | absURL }}" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="{{ "fonts/muli-latin-400.woff2" | absURL }}" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="{{ "fonts/muli-latin-800.woff2" | absURL }}" as="font" type="font/woff2" crossorigin>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
{{/* NOTE: the Site's title, and if there is a page title, that is set too */}}
<title>{{ block "title" . }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }}</title>
<meta name="viewport" content="width=device-width,minimum-scale=1">
{{ hugo.Generator }}
{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
<meta name="robots" content="index, follow">
{{ else }} {{ else }}
<meta name="robots" content="noindex, nofollow"> en-us
{{ end }} {{ end }}
">
<head>
<meta charset="utf-8" />
{{/* https://www.zachleat.com/web/preload/ */}}
<link
rel="preload"
href="{{ "fonts/muli-latin-200.woff2" | absURL }}"
as="font"
type="font/woff2"
crossorigin />
<link
rel="preload"
href="{{ "fonts/muli-latin-400.woff2" | absURL }}"
as="font"
type="font/woff2"
crossorigin />
<link
rel="preload"
href="{{ "fonts/muli-latin-800.woff2" | absURL }}"
as="font"
type="font/woff2"
crossorigin />
{{ range .AlternativeOutputFormats -}} <meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}"> {{/* NOTE: the Site's title, and if there is a page title, that is set too */}}
{{ end -}} <title>
{{ block "title" . }}
{{ with .Title }}{{ . }} |{{ end }}{{ .Site.Title }}
{{ end }}
{{ $isDev := eq hugo.Environment "development" }} </title>
{{ $stylesheet := resources.Get "output/css/app.css" }}
{{ if not $isDev }}
{{ $stylesheet = $stylesheet | minify | fingerprint }}
{{ end }}
{{ with $stylesheet }}
{{ if $isDev }}
<link rel="stylesheet" href="{{ .RelPermalink }}" crossorigin="anonymous">
{{ else }}
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
{{ end }}
{{ $.Scratch.Set "stylesheet" . }}
{{end}}
<meta name="description" <meta name="viewport" content="width=device-width,minimum-scale=1" />
content="{{ with .Description }}{{ . }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}"> {{ hugo.Generator }}
{{ block "scripts" . }} {{ if hugo.IsProduction }}
{{- partial "site-scripts.html" . -}} <meta name="robots" content="index, follow" />
{{ end }} {{ else }}
{{ partial "site-manifest.html" . }} <meta name="robots" content="noindex, nofollow" />
{{- partial "head-additions.html" . -}} {{ end }}
{{- partial "opengraph/opengraph.html" . -}}
{{- template "_internal/schema.html" . -}}
{{- partial "opengraph/twitter_cards.html" . -}}
{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }} {{ range .AlternativeOutputFormats -}}
{{ partial "gtag" . }} <link
{{ end }} rel="{{ .Rel }}"
type="{{ .MediaType.Type }}"
href="{{ .Permalink | safeURL }}" />
{{ end -}}
</head> {{ $isDev := eq hugo.Environment "development" }}
{{ $stylesheet := resources.Get "output/css/app.css" }}
<body class="ma0 sans-serif bg-primary-color-light{{ with getenv "HUGO_ENV" }} {{ . }}{{ end }}"> {{ if not $isDev }}
{{ partial "hooks/after-body-start" . }} {{ $stylesheet = $stylesheet | minify | fingerprint }}
{{ block "nav" . }}{{ partial "site-nav.html" . }}{{ end }} {{ end }}
{{ block "header" . }}{{ end }} {{ with $stylesheet }}
<main role="main" class="content-with-sidebar min-vh-100 pb7 pb0-ns"> {{ if $isDev }}
{{ block "main" . }}{{ end }} <link
</main> rel="stylesheet"
href="{{ .RelPermalink }}"
{{ block "footer" . }}{{ partialCached "site-footer.html" . }}{{ end }} crossorigin="anonymous" />
{{ else }}
{{ partial "hooks/before-body-end" . }} <link
rel="stylesheet"
href="{{ .RelPermalink }}"
integrity="{{ .Data.Integrity }}"
crossorigin="anonymous" />
{{ end }}
{{ $.Scratch.Set "stylesheet" . }}
{{ end }}
</body> <meta
name="description"
content="{{ with .Description }}
{{ . }}
{{ else }}
{{ with .Site.Params.description }}{{ . }}{{ end }}
{{ end }}
" />
{{ block "scripts" . }}
{{- partial "site-scripts.html" . -}}
{{ end }}
{{ partial "site-manifest.html" . }}
{{- partial "head-additions.html" . -}}
{{- partial "opengraph/opengraph.html" . -}}
{{- template "_internal/schema.html" . -}}
{{- partial "opengraph/twitter_cards.html" . -}}
{{ if hugo.IsProduction }}
{{ partial "gtag" . }}
{{ end }}
</head>
<body
class="ma0 sans-serif bg-primary-color-light{{ with getenv "HUGO_ENV" }}
{{ . }}
{{ end }}">
{{ partial "hooks/after-body-start" . }}
{{ block "nav" . }}{{ partial "site-nav.html" . }}{{ end }}
{{ block "header" . }}{{ end }}
<main role="main" class="content-with-sidebar min-vh-100 pb7 pb0-ns">
{{ block "main" . }}{{ end }}
</main>
{{ block "footer" . }}{{ partialCached "site-footer.html" . }}{{ end }}
{{ partial "hooks/before-body-end" . }}
</body>
</html> </html>

View File

@ -1 +1 @@
# github.com/gohugoio/gohugoioTheme v0.0.0-20221217122332-1c1752ad8f14 # github.com/gohugoio/gohugoioTheme v0.0.0-20221220160735-8ffa1ef883b6

2
go.mod
View File

@ -2,4 +2,4 @@ module github.com/gohugoio/hugoDocs
go 1.16 go 1.16
require github.com/gohugoio/gohugoioTheme v0.0.0-20221217122332-1c1752ad8f14 // indirect require github.com/gohugoio/gohugoioTheme v0.0.0-20221220160735-8ffa1ef883b6 // indirect

2
go.sum
View File

@ -49,3 +49,5 @@ github.com/gohugoio/gohugoioTheme v0.0.0-20221206093948-1408550ab675 h1:wjpYa1cT
github.com/gohugoio/gohugoioTheme v0.0.0-20221206093948-1408550ab675/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs= github.com/gohugoio/gohugoioTheme v0.0.0-20221206093948-1408550ab675/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
github.com/gohugoio/gohugoioTheme v0.0.0-20221217122332-1c1752ad8f14 h1:K6tPFpi7W0zb89QIf+lNdgdTXfDFemU6NKk46MlX9lQ= github.com/gohugoio/gohugoioTheme v0.0.0-20221217122332-1c1752ad8f14 h1:K6tPFpi7W0zb89QIf+lNdgdTXfDFemU6NKk46MlX9lQ=
github.com/gohugoio/gohugoioTheme v0.0.0-20221217122332-1c1752ad8f14/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs= github.com/gohugoio/gohugoioTheme v0.0.0-20221217122332-1c1752ad8f14/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
github.com/gohugoio/gohugoioTheme v0.0.0-20221220160735-8ffa1ef883b6 h1:yEoQecRBoLGfc7yTybMD3Mhm03bTScZFYPvwe0p75vA=
github.com/gohugoio/gohugoioTheme v0.0.0-20221220160735-8ffa1ef883b6/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM=