all repos — archie @ 525bcfcd212d164bdc9cd5734a95279485c38016

A minimal Hugo Theme

layouts/partials/header.html (view raw)

 1<head>
 2	<meta charset="utf-8" />
 3	<meta http-equiv="X-UA-Compatible" content="IE=edge">
 4	{{- $title := ( .Title ) -}}
 5	{{- $siteTitle := ( .Site.Title ) -}}
 6	{{- if .IsHome -}}
 7	<title>{{ $siteTitle }} | Home </title>
 8	{{- else -}}
 9	<title>{{ $title }} - {{ $siteTitle }}</title>
10	{{- end -}}
11
12	{{- if isset .Site.Params "favicon" -}}
13	<link rel="icon" type="image/png" href={{ .Site.Params.favicon }} />
14	{{- end -}}
15
16	<meta name="viewport" content="width=device-width, initial-scale=1">
17
18	<meta property="og:description" content="{{ .Params.description }}" />
19	<meta name="twitter:description" content="{{ .Params.description }}" />
20	<meta name="description" content="{{ $.Param "description" }}" />
21	<meta name="description" content="{{ $.Params.description }}" />
22
23	<meta property="og:title" content="{{ $title }} | {{ $siteTitle }}" />
24	<meta name="twitter:title" content="{{ $title }} | {{ $siteTitle }}" />
25
26	<meta property="og:image" content="{{ .Site.Params.og_image }}"/>
27	<meta itemprop="name" content="{{ $title }} | {{ $siteTitle }}" />
28	<meta name="application-name" content="{{ $title }} | {{ $siteTitle }}" />
29	<meta property="og:site_name" content="{{ .Site.Params.sitename }}" />
30	{{ with .OutputFormats.Get "rss" -}}
31	{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
32	{{ end -}}
33	
34	{{- template "_internal/opengraph.html" . -}}
35	{{- template "_internal/twitter_cards.html" . -}}
36	{{ if and (isset .Site.Params "social") (isset .Site.Params "feathericonscdn") (eq .Site.Params.featherIconsCDN true) -}}
37		<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
38	{{- else if (isset .Site.Params "social") -}}
39		<script src="{{ .Site.BaseURL }}js/feather.min.js"></script>
40	{{ end }}
41	<link href="https://fonts.googleapis.com/css2?family=Fira+Sans&display=swap" rel="stylesheet">
42	<link href="https://fonts.googleapis.com/css?family=Roboto+Mono" rel="stylesheet">
43	<link rel="stylesheet" type="text/css" media="screen" href="{{ .Site.BaseURL }}css/main.css" />
44	{{- if or (eq .Site.Params.mode "auto") (eq .Site.Params.mode "dark") -}}
45		<link rel="stylesheet" type="text/css" href="{{ .Site.BaseURL }}css/dark.css" {{ if eq .Site.Params.mode "auto" }}media="(prefers-color-scheme: dark)"{{ end }} />
46	{{ end }}
47	<!-- Custom CSS style get applied last -->
48	{{- if isset .Site.Params "customcss" }}
49		{{ range .Site.Params.customCSS }}
50		<link rel="stylesheet" type="text/css" ref="{{ . | relURL }}">
51		{{ end }}
52	{{- end -}}
53	{{- range .Site.Params.customJS }}
54	{{- if or (hasPrefix . "http://") (hasPrefix . "https://") }}
55	<script src="{{ . }}"></script>
56	{{- else }}
57	<script src="{{ $.Site.BaseURL }}{{ . }}"></script>
58	{{- end }}
59	{{- end }}
60</head>