hugo-theme-anubis2/layouts/partials/head.html

47 lines
1.9 KiB
HTML
Raw Normal View History

2020-01-12 07:51:51 +01:00
<!-- Basic stuff -->
<meta charset="utf-8">
<meta name="HandheldFriendly" content="True">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="referrer" content="no-referrer-when-downgrade">
2020-10-07 21:27:47 +02:00
<title>{{ if and (.Title) (not .IsHome) }}{{ .Title }} - {{ end }}{{ .Site.Title }}</title>
2020-01-12 07:51:51 +01:00
<meta name="description" content="{{ .Site.Params.Description }}">
2020-04-29 21:27:53 +02:00
{{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
2020-01-12 07:51:51 +01:00
2020-02-15 21:34:25 +01:00
<link rel="icon" type="image/x-icon" href="{{ "favicon.ico" | absURL }}">
<link rel="apple-touch-icon-precomposed" href="{{ "favicon.png" | absURL }}">
2020-01-12 07:51:51 +01:00
{{ $cssTemplate := resources.Get "css/main.css" }}
2020-10-25 23:20:32 +01:00
{{ $style := $cssTemplate | resources.ExecuteAsTemplate "css/style.css" . | resources.ToCSS }}
{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
{{ $style = $style | resources.Minify }}
{{ end }}
{{ $style = $style | resources.Fingerprint "sha256" }}
<link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}">
2020-01-12 07:51:51 +01:00
{{ range .Site.Params.customCSS -}}
<link rel="stylesheet" href="{{ . | absURL }}?rnd={{ now.Unix }}">
{{- end }}
2020-07-09 21:42:23 +02:00
{{ range .Site.Params.customJS -}}
<script src="{{ . | absURL }}?rnd={{ now.Unix }}" type="text/javascript" charset="utf-8"></script>
{{- end }}
2020-01-23 21:29:36 +01:00
{{ template "_internal/opengraph.html" . }}
2020-01-23 21:55:42 +01:00
{{ template "_internal/twitter_cards.html" . }}
2020-01-12 07:51:51 +01:00
<!-- Article tags -->
<!-- <meta property="article:published_time" content="">
<meta property="article:modified_time" content="">
<meta property="article:tag" content="">
<meta property="article:publisher" content="https://www.facebook.com/XXX"> -->
2020-01-23 21:55:42 +01:00
2020-01-22 18:51:35 +01:00
{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
{{ template "_internal/google_analytics_async.html" . }}
2020-06-05 17:32:01 +02:00
{{ end }}
2020-06-09 21:45:50 +02:00
{{ partial "head-extra.html" . }}