aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrack3 <pengliabc@live.cn>2019-02-01 18:14:07 +0800
committerTrack3 <pengliabc@live.cn>2019-02-01 18:14:07 +0800
commit6da23e4e20105bc73af0602dd6a1becc18cbf206 (patch)
treee6ad008f7be4bf490327ecbecde43c005ed8ffaf
parent23e22be1eb4ffd261e9cfdf1f9ed9c54118917cb (diff)
Put metadata tags into partial
And update example config.toml (relate to #40)
-rw-r--r--exampleSite/config.toml4
-rw-r--r--layouts/_default/baseof.html4
-rw-r--r--layouts/partials/structured-data.html6
3 files changed, 10 insertions, 4 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index ad9ae5f..f5f6886 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -17,7 +17,9 @@ enableEmoji = true # Shorthand emojis in content files - https://gohugo.io/func
name = "John Doe"
[blackfriday]
- hrefTargetBlank = true
+ # hrefTargetBlank = true
+ # noreferrerLinks = true
+ # nofollowLinks = true
[taxonomies]
tag = "tags"
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 18941b2..b495afe 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -9,9 +9,7 @@
<meta name="theme-color" content="{{.}}">
<meta name="msapplication-TileColor" content="{{.}}">
{{- end }}
- {{- template "_internal/schema.html" . }}
- {{- template "_internal/opengraph.html" . }}
- {{- template "_internal/twitter_cards.html" . }}
+ {{- partial "structured-data.html" . }}
{{- partial "favicons.html" }}
<title>{{.Title}}</title>
{{ range .AlternativeOutputFormats -}}
diff --git a/layouts/partials/structured-data.html b/layouts/partials/structured-data.html
new file mode 100644
index 0000000..4bfb909
--- /dev/null
+++ b/layouts/partials/structured-data.html
@@ -0,0 +1,6 @@
+{{/* We use some Hugo built-in templates, you can find their source here: */}}
+{{/* https://github.com/gohugoio/hugo/tree/master/tpl/tplimpl/embedded/templates */}}
+
+{{- template "_internal/schema.html" . }}
+{{- template "_internal/opengraph.html" . }}
+{{- template "_internal/twitter_cards.html" . }}