theme-mnemosyne-hugo/layouts/_default/baseof.html

33 lines
1.4 KiB
HTML

<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode | default "en-us" }}">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{{ .Title }}</title>
{{ .Scratch.Set "desc" slice }}
{{ with .Site.Params.description }}{{ $.Scratch.Add "desc" (slice .) }}{{ end }}
{{ with .Site.Params.topics }}{{ $.Scratch.Add "desc" (slice (delimit . " & ")) }}{{ end }}
{{ if gt (len (.Scratch.Get "desc")) 0 }}
<meta name="description" content="{{ delimit (.Scratch.Get "desc") " " }}">
{{ end }}
{{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
{{ $style := resources.Get "style/main.sass" | resources.ToCSS }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
{{ with .Site.Params.comments.webmention }}<link rel="webmention" href="{{ . }}" />{{ end }}
{{ with .Site.Params.comments.pingback }}<link rel="pingback" href="{{ . }}" />{{ end }}
{{ if .Site.Params.comments.cactus }}<link rel="stylesheet" href="https://latest.cactus.chat/style.css" type="text/css">{{ end }}
{{ with .OutputFormats.Get "RSS" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
{{- end }}
</head>
<body>
{{ partial "header" . }}
{{ block "main" . }}{{ end }}
{{ partial "footer" . }}
{{ partial "scripts" . }}
</body>
</html>