mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-08-11 09:41:36 -05:00
Add warning if twitter username is missing
I don't know if the docs are correct, but they seem to say that twitter:site is required for a card to render at all. Better safe than sorry. https://developer.x.com/en/docs/x-for-websites/cards/overview/markup
This commit is contained in:
@@ -31,6 +31,8 @@
|
|||||||
*/}}
|
*/}}
|
||||||
{{ with .Site.Params.social.twitter }}
|
{{ with .Site.Params.social.twitter }}
|
||||||
<meta name="twitter:site" content="@{{ . }}">
|
<meta name="twitter:site" content="@{{ . }}">
|
||||||
|
{{ else }}
|
||||||
|
{{ errorf "a twitter username is required for twitter cards to work" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ with .GetTerms "authors" }}
|
{{ with .GetTerms "authors" }}
|
||||||
{{ range . }}
|
{{ range . }}
|
||||||
|
Reference in New Issue
Block a user