msfjarvis.dev/themes/hyde/layouts/partials/head.html
Harsh Shandilya f7ef842460 themes/hyde: Load syntax CSS with the main bundle
Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
2020-01-10 21:49:48 +05:30

38 lines
1.8 KiB
HTML

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"{{with .Site.LanguageCode}} xml:lang="{{.}}" lang="{{.}}"{{end}}>
<head>
<link href="https://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
{{ hugo.Generator }}
<!-- Enable responsiveness on mobile devices-->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{{ if .IsHome -}}
<title>{{ .Site.Title }}</title>
{{- else -}}
<title>{{ .Title }} &middot; {{ .Site.Title }}</title>
{{- end }}
<meta name="description" content="{{if .IsHome}}{{ $.Site.Params.description }}{{else}}{{.Description}}{{end}}" />
<!-- CSS -->
{{ $poole := resources.Get "css/poole.css" | resources.ExecuteAsTemplate "poole.css" . }}
{{ $hyde := resources.Get "css/hyde.css" | resources.ExecuteAsTemplate "hyde.css" . }}
{{ $print := resources.Get "css/print.css" | resources.ExecuteAsTemplate "print.css" . | minify | fingerprint }}
{{ $syntax := resources.Get "css/syntax.css" | resources.ExecuteAsTemplate "syntax.css" . }}
{{ $styles := slice $poole $hyde $syntax | resources.Concat "styles.css" | minify | fingerprint }}
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" {{ printf "integrity=%q" $styles.Data.Integrity | safeHTMLAttr }}>
<link rel="stylesheet" href="{{ $print.RelPermalink }}" {{ printf "integrity=%q" $print.Data.Integrity | safeHTMLAttr }} media="print">
{{ partial "head_fonts.html" . }}
<!-- Icons -->
<link rel="shortcut icon" href="{{ .Site.BaseURL }}favicon-32x32.webp">
<!-- RSS etc -->
{{ range .AlternativeOutputFormats -}}
{{ printf `<link href="%s" rel="%s" type="%s" title="%s" />` .Permalink .Rel .MediaType.Type $.Site.Title | safeHTML }}
{{ end -}}
{{ partial "hook_head_end.html" . }}
</head>