Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/AmazingRise/hugo-theme-diary.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndries <andries.vanhumbeeck@outlook.com>2020-06-12 12:56:01 +0300
committerAndries <andries.vanhumbeeck@outlook.com>2020-06-12 12:56:01 +0300
commitd28dc8d1725b6b7dde11b6831fd52b771108dcd9 (patch)
treec76a1349ce21852a09bf676aa836d30cf1915b15
parent8d025c72f4028938c26e39888bc9a67d4064a077 (diff)
enable twitter cards
-rw-r--r--exampleSite/config.toml6
-rw-r--r--layouts/partials/head.html5
2 files changed, 8 insertions, 3 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 487f217..3602368 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -21,10 +21,10 @@ theme = "diary"
[params]
subtitle = "Themed by Diary."
enableGitalk = true
-description = "My HomePage Description"
enableOpenGraph = true
-title = "My Blog" # will set 'og:title'
-description = "A collection of blogposts" # will set 'og:description'
+enableTwitterCards = true
+title = "My Blog" # will set 'og:site_name'
+description = "My HomePage Description" # will set 'og:description'
[params.gitalk]
owner = "user"
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index baad4d7..a43b9b7 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -20,6 +20,11 @@
{{ template "_internal/opengraph.html" . }}
{{end}}
+<!-- twitter-cards -->
+{{if .Site.Params.enableTwitterCards}}
+{{ template "_internal/twitter_cards.html" . }}
+{{end}}
+
<!-- metadata -->
{{ if .Site.GoogleAnalytics }}