hermit-V2/layouts/_default/baseof.html
Arnab Kumar Shil 6f864b437d Add meta descriptions to document head (#19)
Use Hugo‘s built in `schema.html` `opengraph.html` `twitter_cards.html` templates
2018-12-29 13:50:49 +08:00

39 lines
1.8 KiB
HTML

<!DOCTYPE html>
<html lang="{{.Site.LanguageCode}}">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
{{- with .Site.Params.themeColor }}
<meta name="theme-color" content="{{.}}">
<meta name="msapplication-TileColor" content="{{.}}">
{{- end }}
{{ template "_internal/schema.html" . -}}
{{ template "_internal/opengraph.html" . -}}
{{ template "_internal/twitter_cards.html" . -}}
<link rel="apple-touch-icon" sizes="180x180" href="{{"apple-touch-icon.png" | relURL}}">
<link rel="icon" type="image/png" sizes="32x32" href="{{"favicon-32x32.png" | relURL}}">
<link rel="icon" type="image/png" sizes="16x16" href="{{"favicon-16x16.png" | relURL}}">
<link rel="manifest" href="{{"site.webmanifest" | relURL}}">
<link rel="mask-icon" href="{{"safari-pinned-tab.svg" | relURL}}" color="{{.Site.Params.themeColor}}">
<link rel="shortcut icon" href="{{"favicon.ico" | relURL}}">
<title>{{.Title}}</title>
{{ range .AlternativeOutputFormats -}}
{{ printf `<link rel="%s" type="%s+%s" href="%s" title="%s" />` .Rel .MediaType.Type .MediaType.Suffix .Permalink $.Site.Title | safeHTML }}
{{ end -}}
{{ $style := resources.Get "scss/style.scss" | resources.ExecuteAsTemplate "css/style.css" . | toCSS | minify | fingerprint -}}
<link rel="stylesheet" href="{{ $style.Permalink }}" {{ printf "integrity=%q" $style.Data.Integrity | safeHTMLAttr }}>
{{ block "head" . -}}{{- end }}
</head>
<body id="page">
{{ block "header" . -}}{{ end -}}
{{ block "main" . -}}{{ end -}}
{{ block "footer" . -}}{{ end }}
{{ $script := resources.Get "js/main.js" | minify | fingerprint -}}
<script src="{{ $script.Permalink }}" {{ printf "integrity=%q" $script.Data.Integrity | safeHTMLAttr }}></script>
{{ template "_internal/google_analytics_async.html" . }}
</body>
</html>