added rss template. General cleanup of the theme.
[theme-danix.xyz.git] / layouts / partials / head.html
index e69de29..0197516 100644 (file)
@@ -0,0 +1,31 @@
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+       <link rel="profile" href="https://gmpg.org/xfn/11">
+
+       {{ $style_options := (dict "targetPath" "css/style.css" "outputStyle" "compressed" "transpiler" "dartsass" "enableSourceMap" (not hugo.IsProduction)) }}
+       {{ $style := resources.Get "sass/main.scss" | resources.ToCSS $style_options }}
+
+       {{ $noscript_options := (dict "targetPath" "css/noscript.css" "outputStyle" "compressed" "transpiler" "dartsass" "enableSourceMap" (not hugo.IsProduction)) }}
+       {{ $noscript := resources.Get "sass/noscript.scss" | resources.ToCSS $noscript_options }}
+
+       <link rel="stylesheet" href="{{ $style.RelPermalink }}">
+       <noscript><link rel="stylesheet" href="{{ $noscript.RelPermalink }}" /></noscript>
+       {{ partial "funcs/favicon.html" . }}
+       <link rel="canonical" href="{{ .Permalink }}">
+
+       {{ with .OutputFormats.Get "rss" -}}
+           {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
+       {{ end -}}
+
+    {{ $title := print .Site.Title " ⋇ " .Title }}
+    {{ if .IsHome }}{{ $title = .Site.Title }}{{ end }}
+    <title>{{ $title }}</title>
+
+       {{ template "_internal/opengraph.html" . }}
+       {{ template "_internal/schema.html" . }}
+       {{ template "_internal/twitter_cards.html" . }}
+
+       {{- partial "head-addition.html" . -}}
+
+</head>