Casual_blog/themes/anubis2/layouts/partials/head.html

99 lines
3.4 KiB
HTML

<!-- 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">
{{ partial "title.html" . }}
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}">
{{ template "_internal/opengraph.html" . }}
{{ template "_internal/twitter_cards.html" . }}
<!-- -->
<!-- <meta property="og:title" content="{{ .Title }}" /> -->
<!-- <meta property="og:description" content="{{ .Summary }}" /> -->
<!-- <meta property="og:image" content="{{ .Params.image }}" /> -->
<!-- <meta property="og:url" content="{{ .Permalink }}" /> -->
<!-- <meta property="og:type" content="article" /> -->
<!-- -->
<!-- <meta property="og:image" content="{{ .Params.image }}" /> -->
<!-- <meta name="twitter:card" content="summary_large_image" /> -->
<!-- <meta name="twitter:image" content="{{ .Params.image }}" /> -->
<meta name="telegram:channel" content="casualblog" />
{{ with .Keywords }}
<meta name="keywords" content="{{ range $i, $e := . }}{{ if $i }},{{ end }}{{ $e }}{{ end }}">
{{ end }}
{{ if and (.IsPage) (eq .Params.hidden true)}}
<meta name="robots" content="noindex" />
{{ end }}
{{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
{{ partial "favicons.html" . }}
{{ $style := "light-without-switcher" }}
{{ if and (isset site.Params "style") (ne site.Params.style "") }}
{{ $style = site.Params.style | lower }}
{{ end }}
{{ if not (in (slice "light-without-switcher" "dark-without-switcher") $style) }}
<style>
body {
visibility: hidden;
opacity: 0;
}
</style>
<noscript>
<style>
body {
visibility: visible;
opacity: 1;
}
</style>
</noscript>
{{end}}
{{ partial "resource.html" (dict "context" . "type" "css" "filename" "css/main.css") }}
{{ if .Site.Params.copyCodeButton | default true }}
{{ partial "resource.html" (dict "context" . "type" "js" "filename" "js/copy-code.js") }}
{{ end }}
{{ range .Site.Params.customJS -}}
{{ partial "resource.html" (dict "context" $ "type" "js" "filename" . ) }}
{{- end }}
{{ if isset .Site.Params "webmentions" }}
{{ if isset .Site.Params.webmentions "login" }}
<link rel="webmention" href="https://webmention.io/{{.Site.Params.webmentions.login}}/webmention" />
{{ if eq .Site.Params.webmentions.pingback true }}
<link rel="pingback" href="https://webmention.io/{{.Site.Params.webmentions.login}}/xmlrpc" />
{{ end }}
{{ end }}
{{ if isset .Site.Params.webmentions "url" }}
<link rel="webmention" href="{{.Site.Params.webmentions.url}}" />
{{ end }}
{{ end }}
<!-- 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"> -->
{{ if and (.Site.Config.Services.GoogleAnalytics.ID) (hugo.IsProduction) }}
{{ template "_internal/google_analytics.html" . }}
{{ end }}
{{ if (.Site.Params.UmamiAnalytics.enabled ) }}
{{ partial "umami_analytics.html" . }}
{{ end }}
{{ partial "head-extra.html" . }}