add site specific meta keyword, description, author to head
This commit is contained in:
parent
73127fcbc9
commit
c4fb87b392
|
@ -1,11 +1,29 @@
|
|||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
|
||||
<title>{{ .Site.Title }} - {{ .Site.Params.longTitle }}</title>
|
||||
<link rel="shortcut icon" href="/favicon.ico">
|
||||
<link rel="icon" type="image/png" href="/favicon.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="/favicon.png" sizes="96x96">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
|
||||
{{ range .AlternativeOutputFormats -}}
|
||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
||||
{{ end -}}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
|
||||
{{- if .IsHome }}
|
||||
{{- $author := index $.Site.Data.authors .Site.Params.author }}
|
||||
{{- with .Site.Params.description }}
|
||||
<meta name="description" content="{{ . }}">
|
||||
{{- end }}
|
||||
<meta name="author" content="{{ $author.name }}">
|
||||
{{- else if in .Page.URL "/posts/" }}
|
||||
{{- with .Page.Description }}
|
||||
<meta name="description" content="{{ . }}">
|
||||
{{- end }}
|
||||
{{- with .Page.Keywords }}
|
||||
<meta name="keywords" content="{{ .Page.Keywords }}">
|
||||
{{- end }}
|
||||
{{- with .Page.Params.Author }}
|
||||
{{- $author := index $.Site.Data.authors . }}
|
||||
<meta name="author" content="{{ $author.name }}">
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
<title>{{ .Site.Title }} - {{ .Site.Params.longTitle }}</title>
|
||||
<link rel="shortcut icon" href="/favicon.ico">
|
||||
<link rel="icon" type="image/png" href="/favicon.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="/favicon.png" sizes="96x96">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
|
||||
{{- range .AlternativeOutputFormats -}}
|
||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
||||
{{- end }}
|
||||
</head>
|
||||
|
|
Reference in New Issue