Permalink
Browse files

config: Allow twitter social icon to be commented out

Breaking change:
`twitter` option added to `config.toml` for social sharing metadata
  • Loading branch information...
gcushen committed Sep 10, 2018
1 parent 304211d commit 99e0edf9bb63dbdea003a255cb7a3a2ff4f80e1b
Showing with 4 additions and 3 deletions.
  1. +1 −0 exampleSite/config.toml
  2. +3 −3 layouts/partials/header.html
View
@@ -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 }}">

0 comments on commit 99e0edf

Please sign in to comment.