Breaking change: `twitter` option added to `config.toml` for social sharing metadata
@@ -70,6 +70,7 @@ enableGitInfo = false
address = "Building 1 Room 1, Stanford University, California, 90210, USA"
office_hours = "Monday 10:00 to 13:00 or email for appointment"
phone = "888 888 88 88"
+ twitter = ""
skype = "echo123"
telegram = ""
@@ -118,9 +118,9 @@
<link rel="canonical" href="{{ .Permalink }}">
<meta property="twitter:card" content="summary_large_image">
- {{ range where $.Site.Params.social ".icon" "twitter" }}
- <meta property="twitter:site" content="@{{ replaceRE "^//twitter.com/([^/]+)" "$1" .link }}">
- <meta property="twitter:creator" content="@{{ replaceRE "^//twitter.com/([^/]+)" "$1" .link }}">
+ {{ with .Site.Params.twitter }}
+ <meta property="twitter:site" content="@{{ . }}">
+ <meta property="twitter:creator" content="@{{ . }}">
{{ end }}
<meta property="og:site_name" content="{{ .Site.Title }}">
<meta property="og:url" content="{{ .Permalink }}">