diff options
-rw-r--r-- | README.md | 12 | ||||
-rw-r--r-- | layouts/partials/head.html | 3 |
2 files changed, 14 insertions, 1 deletions
@@ -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> |