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

github.com/joway/hugo-theme-yinyang.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md12
-rw-r--r--layouts/partials/head.html3
2 files changed, 14 insertions, 1 deletions
diff --git a/README.md b/README.md
index b1316f9..8645c27 100644
--- a/README.md
+++ b/README.md
@@ -90,6 +90,18 @@ extraHead = '<script src="xxxx.js"></script>'
extraCSSFiles = ["css/foo.css", "css/bar.css"]
```
+### Twitter Cards
+
+Add the following setting:
+
+```
+[params]
+twitterCards = true
+```
+
+In a post's front matter, include a keyword `images` with a value of a list of
+URLs of images that will be used for Twitter Cards.
+
### Insert content on every post
```
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 3e12d4c..1636ed4 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -63,5 +63,6 @@
(function (undefined) { }).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
</script> -->
+ {{ if .Site.Params.TwitterCards }}{{ template "_internal/twitter_cards.html" . }}{{ end }}
{{ .Site.Params.extraHead | safeHTML }}
-</head> \ No newline at end of file
+</head>