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

github.com/gohugoio/hugoDocs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Constant <joe@joeconstant.com>2022-11-07 14:10:32 +0300
committerGitHub <noreply@github.com>2022-11-07 14:10:32 +0300
commit35b904798843d98f41f5b5ac00dd859894e5bea6 (patch)
tree6067da45a630f9ed83698f5efd8c5852bf87d590
parent672042f898739fd48edee687c2d7e9d799f31ae6 (diff)
Add small documentation about .Site.Social.twitter variable (#1854)
-rw-r--r--content/en/templates/internal.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/content/en/templates/internal.md b/content/en/templates/internal.md
index 8bc832c27..79479bdfe 100644
--- a/content/en/templates/internal.md
+++ b/content/en/templates/internal.md
@@ -203,6 +203,18 @@ If no images are found at all, then an image-less Twitter `summary` card is used
Hugo uses the page title and description for the card's title and description fields. The page summary is used if no description is given.
+The `.Site.Social.twitter` variable is exposed from the config as the value for `twitter:site`.
+
+{{< code-toggle file="config" >}}
+[social]
+ twitter = "GoHugoIO"
+{{</ code-toggle >}}
+
+NOTE: The `@` will be added for you
+```
+<meta name="twitter:site" content="@GoHugoIO"/>
+```
+
### Use the Twitter Cards Template
To add Twitter card metadata, include the following line immediately after the `<head>` element in your templates: