From 4fae038bc52b45bcbf41e7071a4b641fd88a87bc Mon Sep 17 00:00:00 2001 From: vimux Date: Sat, 12 Jan 2019 13:55:37 -0500 Subject: [PATCH] Split baseof.html layout: add head as a partial --- layouts/_default/baseof.html | 28 +--------------------------- layouts/partials/head.html | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 27 deletions(-) create mode 100644 layouts/partials/head.html diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 77f619d..ed388a9 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,32 +1,6 @@ - - - - - - {{ if not .IsHome }}{{ .Title }} | {{ end }}{{ .Site.Title }} - - - {{- if .Site.Params.opengraph }} - {{ template "_internal/opengraph.html" . }} - {{- end }} - {{- if .Site.Params.twitter_cards }} - {{ template "_internal/twitter_cards.html" . }} - {{- end }} - - - - {{- with .OutputFormats.Get "rss" }} - {{ printf `` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }} - {{- end }} - {{- if and (.Site.Params.Manifest) ((.Site.GetPage "home").OutputFormats.Get "manifest") -}} - - {{- end }} - {{- if not .Site.IsServer }} - {{ template "_internal/google_analytics_async.html" . }} - {{- end }} - +{{ partial "head.html" . }} {{ partial "header" . }}
diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..71c1090 --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,27 @@ + + + + + + {{ if not .IsHome }}{{ .Title }} | {{ end }}{{ .Site.Title }} + + + {{- if .Site.Params.opengraph }} + {{ template "_internal/opengraph.html" . }} + {{- end }} + {{- if .Site.Params.twitter_cards }} + {{ template "_internal/twitter_cards.html" . }} + {{- end }} + + + + {{- with .OutputFormats.Get "rss" }} + {{ printf `` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }} + {{- end }} + {{- if and (.Site.Params.Manifest) ((.Site.GetPage "home").OutputFormats.Get "manifest") -}} + + {{- end }} + {{- if not .Site.IsServer }} + {{ template "_internal/google_analytics_async.html" . }} + {{- end }} + \ No newline at end of file