aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/head.html
diff options
context:
space:
mode:
authorolOwOlo <26087907+olOwOlo@users.noreply.github.com>2017-08-27 22:38:42 +0800
committerolOwOlo <26087907+olOwOlo@users.noreply.github.com>2017-08-27 22:38:42 +0800
commit3c6cb7f29631dfcdd954e7cbd5d2370efe7eb827 (patch)
treed374e090981dda28452dbd13400e377b9cc06277 /layouts/partials/head.html
🎉 first commit
Diffstat (limited to 'layouts/partials/head.html')
-rw-r--r--layouts/partials/head.html71
1 files changed, 71 insertions, 0 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
new file mode 100644
index 0000000..0310b16
--- /dev/null
+++ b/layouts/partials/head.html
@@ -0,0 +1,71 @@
+<meta name="renderer" content="webkit" />
+<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
+
+<meta http-equiv="Cache-Control" content="no-transform" />
+<meta http-equiv="Cache-Control" content="no-siteapp" />
+
+<meta name="theme-color" content="#f8f5ec" />
+<meta name="msapplication-navbutton-color" content="#f8f5ec">
+<meta name="apple-mobile-web-app-capable" content="yes">
+<meta name="apple-mobile-web-app-status-bar-style" content="#f8f5ec">
+
+<!-- author & description & keywords -->
+<meta name="author" content="{{ if .Params.author }}{{ .Params.author | safeHTML }}{{ else }}{{ .Site.Author.name | safeHTML }}{{ end }}" />
+
+{{- if .Description -}}
+ <meta name="description" content="{{ .Description | safeHTML }}" />
+{{ else if .IsPage }}
+ <meta name="description" content="{{ .Summary | plainify }}" />
+{{ else if .Site.Params.description }}
+ <meta name="description" content="{{ .Site.Params.description | safeHTML }}" />
+{{- end -}}
+
+{{- if .Keywords -}}
+ {{ $length := len .Keywords | add -1 -}}
+ <meta name="keywords" content="{{ range $index, $element := .Keywords }}{{ $element | safeHTML }}{{if ne $index $length }}, {{ end }}{{ end }}" />
+{{ else if .Site.Params.keywords }}
+ {{ $length := len .Site.Params.keywords | add -1 -}}
+ <meta name="keywords" content="{{ range $index, $element := .Site.Params.keywords }}{{ $element | safeHTML }}{{if ne $index $length }}, {{ end }}{{ end }}" />
+{{- end }}
+
+<!-- baidu & google verification -->
+{{ with .Site.Params.baidu_verification }}<meta name="baidu-site-verification" content="{{.}}" />{{ end }}
+{{ with .Site.Params.google_verification }}<meta name="google-site-verification" content="{{.}}" />{{ end }}
+
+<!-- Site Generator -->
+<meta name="generator" content="Hugo {{ .Hugo.Version }}" />
+
+<!-- Permalink & RSSlink -->
+<link rel="canonical" href="{{ .Permalink }}" />
+{{ if .RSSLink -}}
+ <link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
+ <link href="{{ .RSSLink }}" rel="feed" type="application/rss+xml" title="{{ .Site.Title }}" />
+{{ end -}}
+
+<!-- Favicon and Touch icons -->
+<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
+<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
+<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
+<link rel="icon" href="/favicon.ico" />
+<link rel="manifest" href="/manifest.json">
+<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
+
+<!-- Styles -->
+<link href="/dist/even.v{{ .Site.Params.version }}.css" rel="stylesheet">
+{{ if .Site.Params.bootcdn -}}
+ {{ if .Site.Params.fancybox }}<link href="https://cdn.bootcss.com/fancybox/3.1.20/jquery.fancybox.min.css" rel="stylesheet">{{ end }}
+{{ else -}}
+ {{ if .Site.Params.fancybox }}<link href="/lib/fancybox/jquery.fancybox-3.1.20.min.css" rel="stylesheet">{{ end }}
+{{- end }}
+
+{{/* NOTE: These Hugo Internal Templates can be found starting at https://github.com/spf13/hugo/blob/master/tpl/tplimpl/template_embedded.go#L158 */}}
+{{- template "_internal/opengraph.html" . -}}
+{{- template "_internal/google_news.html" . -}}
+{{- template "_internal/schema.html" . -}}
+{{- template "_internal/twitter_cards.html" . -}}
+
+<!-- Polyfill for old browsers -->
+{{ `<!--[if lt IE 9]>
+ <script src="//cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+ <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
+<![endif]-->` | safeHTML }}