diff options
author | Linlin Yan <yanlinlin82@gmail.com> | 2019-12-20 08:49:27 +0300 |
---|---|---|
committer | Linlin Yan <yanlinlin82@gmail.com> | 2019-12-20 08:49:27 +0300 |
commit | ceeeed5a43387fd4ff16be5952f7324a6d06bf7e (patch) | |
tree | 0d0f3a13f2b817e8fb7f8f3fe616e6c585dd3758 | |
parent | 628ee34b508b0e613f193524d0487ea00b882ec7 (diff) |
Add html meta tags
-rw-r--r-- | layouts/_default/baseof.html | 4 | ||||
-rw-r--r-- | layouts/partials/html-meta.html | 15 |
2 files changed, 16 insertions, 3 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 1a3b8e3..f29702b 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -3,9 +3,7 @@ <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> -{{ with .Site.Params.googleSiteVerification -}} -<meta name="google-site-verification" content="{{ . }}"> -{{ end -}} +{{ partial "html-meta.html" . -}} <title>{{ if not .IsHome }}{{ .Title }} - {{ end }}{{ .Site.Title }}</title> <style type="text/css"> body{margin:16px auto;max-width:677px;padding:0 10px;color:#333;line-height:1.6} diff --git a/layouts/partials/html-meta.html b/layouts/partials/html-meta.html new file mode 100644 index 0000000..3810136 --- /dev/null +++ b/layouts/partials/html-meta.html @@ -0,0 +1,15 @@ +{{ with .Site.Params.googleSiteVerification -}} +<meta name="google-site-verification" content="{{ . }}"> +{{ end -}} +{{ with .Site.Params.author -}} +<meta name="author" content="{{ . }}"> +{{ end -}} +{{ with .Site.Params.description -}} +<meta name="description" content="{{ . }}"> +{{ end -}} +{{ with .Site.Params.keywords -}} +<meta name="keywords" content="{{ . }}"> +{{ end -}} +{{ with .Site.Params.referrer -}} +<meta name="referrer" content="{{ . }}"> +{{ end -}} |