mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-15 09:54:40 -04:00
Add small documentation about .Site.Social.twitter variable (#1854)
This commit is contained in:
parent
672042f898
commit
35b9047988
@ -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.
|
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
|
### Use the Twitter Cards Template
|
||||||
|
|
||||||
To add Twitter card metadata, include the following line immediately after the `<head>` element in your templates:
|
To add Twitter card metadata, include the following line immediately after the `<head>` element in your templates:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user