Fix titles for social cards

This commit is contained in:
ines 2017-10-03 14:54:33 +02:00
parent 23019d1daa
commit b24fbd8aad

View File

@ -3,6 +3,7 @@
include _includes/_mixins include _includes/_mixins
- title = IS_MODELS ? LANGUAGES[current.source] || title : title - title = IS_MODELS ? LANGUAGES[current.source] || title : title
- social_title = (SECTION == "index") ? SITENAME + " - " + SLOGAN : title + " - " + SITENAME
- social_img = SITE_URL + "/assets/img/social/preview_" + (preview || ALPHA ? "alpha" : "default") + ".jpg" - social_img = SITE_URL + "/assets/img/social/preview_" + (preview || ALPHA ? "alpha" : "default") + ".jpg"
doctype html doctype html
@ -26,13 +27,13 @@ html(lang="en")
meta(property="og:type" content="website") meta(property="og:type" content="website")
meta(property="og:site_name" content=sitename) meta(property="og:site_name" content=sitename)
meta(property="og:url" content="#{SITE_URL}/#{current.path.join('/')}") meta(property="og:url" content="#{SITE_URL}/#{current.path.join('/')}")
meta(property="og:title" content="#{title} - spaCy") meta(property="og:title" content=social_title)
meta(property="og:description" content=description) meta(property="og:description" content=description)
meta(property="og:image" content=social_img) meta(property="og:image" content=social_img)
meta(name="twitter:card" content="summary_large_image") meta(name="twitter:card" content="summary_large_image")
meta(name="twitter:site" content="@" + SOCIAL.twitter) meta(name="twitter:site" content="@" + SOCIAL.twitter)
meta(name="twitter:title" content="#{title} - spaCy") meta(name="twitter:title" content=social_title)
meta(name="twitter:description" content=description) meta(name="twitter:description" content=description)
meta(name="twitter:image" content=social_img) meta(name="twitter:image" content=social_img)