[baseof.html,404.html] Add basic meta support
This commit is contained in:
@ -2,6 +2,10 @@
|
||||
{{ .Title }} ⏎
|
||||
{{ end }}
|
||||
|
||||
{{ define "meta" }}
|
||||
<meta name="robots" content="noindex">
|
||||
{{ 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 }}
|
||||
<script src="{{ $particlesJs.Permalink }}" type="text/javascript"></script>
|
||||
{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
{{ $jsOptions := ( dict "target" "es2018" "minify" true ) }}
|
||||
{{ $rainJs := resources.Get "js/rain.js" | js.Build $jsOptions | fingerprint }}
|
||||
|
@ -7,12 +7,27 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>
|
||||
{{ block "title" . }} ⏎
|
||||
{{ end }}
|
||||
{{ .Site.Title }}
|
||||
{{ block "title" . }} ⏎ {{ end }} {{ .Site.Title }}
|
||||
</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="color-scheme" content="light dark">
|
||||
{{ if .Params.noindex }}
|
||||
<meta name="robots" content="noindex">
|
||||
{{ else if .Params.noarchive }}
|
||||
<meta name="robots" content="noarchive">
|
||||
{{ end }}
|
||||
{{ if .IsHome }}
|
||||
{{ with $.Site.Params.description }}
|
||||
<meta name="description" content="{{.}}">
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Params.description }}
|
||||
<meta name="description" content="{{.}}">
|
||||
{{ 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 }}
|
||||
<link type="text/css" rel="stylesheet" href="{{ $navigationCss.Permalink }}">
|
||||
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
|
||||
{{ block "links" . }}
|
||||
{{ end }}
|
||||
</head>
|
||||
|
Reference in New Issue
Block a user