refactors/revises theme layouts

This commit is contained in:
Huy Tran 2018-07-21 06:32:00 +10:00
parent f1605d3802
commit 5701197651
15 changed files with 80 additions and 55 deletions

View file

@ -4,5 +4,15 @@
{{ "<!-- Enable responsiveness on mobile devices -->" | safeHTML }}
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
{{ .Hugo.Generator }}
{{- if .IsHome }}
{{ $.Scratch.Set "theTitle" .Site.Title -}}
{{else}}
{{ $.Scratch.Add "theTitle" .Title}}
{{ $.Scratch.Add "theTitle" " • "}}
{{ $.Scratch.Add "theTitle" .Site.Title}}
{{- end -}}
<title>{{ $.Scratch.Get "theTitle" }}</title>
{{ with .Site.Params.meta.description -}}<meta name="description" content="{{ . }}">{{- end }}
{{ with .Site.Params.meta.keywords -}}<meta name="keywords" content="{{.}}">{{- end }}
{{ partial "header/twitter_cards.html" . }}
{{ partial "header/opengraph.html" . }}