Split baseof.html layout: add head as a partial

This commit is contained in:
vimux 2019-01-12 13:55:37 -05:00
parent ff1883aa39
commit 4fae038bc5
No known key found for this signature in database
GPG key ID: 5A34FDC4EE832E34
2 changed files with 28 additions and 27 deletions

View file

@ -1,32 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html class="no-js" lang="{{ .Site.LanguageCode | default "en-us" }}"> <html class="no-js" lang="{{ .Site.LanguageCode | default "en-us" }}">
<head> {{ partial "head.html" . }}
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="{{ .Site.Params.Manifest.themeColor | default "#1b1b1b" }}">
<title>{{ if not .IsHome }}{{ .Title }} | {{ end }}{{ .Site.Title }}</title>
<script>(function(d,e){d[e]=d[e].replace("no-js","js");})(document.documentElement,"className");</script>
<meta name="description" content="{{ if .IsHome }}{{ .Site.Params.description }}{{ else }}{{ .Description }}{{ end }}">
{{- if .Site.Params.opengraph }}
{{ template "_internal/opengraph.html" . }}
{{- end }}
{{- if .Site.Params.twitter_cards }}
{{ template "_internal/twitter_cards.html" . }}
{{- end }}
<link rel="stylesheet" href="{{ "css/main.css" | relURL }}">
<link rel="icon" href="{{ "icons/16.png" | relURL }}" sizes="16x16" type="image/png">
<link rel="icon" href="{{ "icons/32.png" | relURL }}" sizes="32x32" type="image/png">
{{- with .OutputFormats.Get "rss" }}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
{{- end }}
{{- if and (.Site.Params.Manifest) ((.Site.GetPage "home").OutputFormats.Get "manifest") -}}
<link rel="manifest" href="{{ "manifest.json" | relURL }}">
{{- end }}
{{- if not .Site.IsServer }}
{{ template "_internal/google_analytics_async.html" . }}
{{- end }}
</head>
<body> <body>
{{ partial "header" . }} {{ partial "header" . }}
<div class="primary"> <div class="primary">

View file

@ -0,0 +1,27 @@
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="{{ .Site.Params.Manifest.themeColor | default "#1b1b1b" }}">
<title>{{ if not .IsHome }}{{ .Title }} | {{ end }}{{ .Site.Title }}</title>
<script>(function(d,e){d[e]=d[e].replace("no-js","js");})(document.documentElement,"className");</script>
<meta name="description" content="{{ if .IsHome }}{{ .Site.Params.description }}{{ else }}{{ .Description }}{{ end }}">
{{- if .Site.Params.opengraph }}
{{ template "_internal/opengraph.html" . }}
{{- end }}
{{- if .Site.Params.twitter_cards }}
{{ template "_internal/twitter_cards.html" . }}
{{- end }}
<link rel="stylesheet" href="{{ "css/main.css" | relURL }}">
<link rel="icon" href="{{ "icons/16.png" | relURL }}" sizes="16x16" type="image/png">
<link rel="icon" href="{{ "icons/32.png" | relURL }}" sizes="32x32" type="image/png">
{{- with .OutputFormats.Get "rss" }}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
{{- end }}
{{- if and (.Site.Params.Manifest) ((.Site.GetPage "home").OutputFormats.Get "manifest") -}}
<link rel="manifest" href="{{ "manifest.json" | relURL }}">
{{- end }}
{{- if not .Site.IsServer }}
{{ template "_internal/google_analytics_async.html" . }}
{{- end }}
</head>