Move social image logic out to function and move files

This commit is contained in:
ines 2017-06-01 14:27:44 +02:00
parent 8fc52878f7
commit b577ed79ee
6 changed files with 15 additions and 3 deletions

View File

@ -22,3 +22,14 @@
- var branch = ALPHA ? 'develop' : branch
- return 'https://github.com/' + SOCIAL.github + '/' + repo + (filepath ? '/blob/' + (branch || 'master') + '/' + filepath : '' );
- }
//- Get social images
- function getSocialImg() {
- var base = SITE_URL + '/assets/img/social/preview_'
- var image = 'default'
- if (preview) image = preview
- else if (SECTION == 'docs') image = 'docs'
- return base + image + '.jpg'
- }

View File

@ -24,13 +24,13 @@ html(lang="en")
meta(property="og:url" content="#{SITE_URL}/#{current.path.join('/')}")
meta(property="og:title" content="#{title} - spaCy")
meta(property="og:description" content=description)
meta(property="og:image" content="#{SITE_URL}/assets/img/social#{(SECTION == 'docs') ? '_docs' : ''}.jpg")
meta(property="og:image" content=getSocialImg())
meta(name="twitter:card" content="summary_large_image")
meta(name="twitter:site" content="@" + SOCIAL.twitter)
meta(name="twitter:title" content="#{title} - spaCy")
meta(name="twitter:description" content=description)
meta(name="twitter:image" content="#{SITE_URL}/assets/img/social#{(SECTION == 'docs') ? '_docs' : ''}.jpg")
meta(name="twitter:image" content=getSocialImg())
link(rel="shortcut icon" href="/assets/img/favicon.ico")
link(rel="icon" type="image/x-icon" href="/assets/img/favicon.ico")

Binary file not shown.

After

Width:  |  Height:  |  Size: 380 KiB

View File

Before

Width:  |  Height:  |  Size: 364 KiB

After

Width:  |  Height:  |  Size: 364 KiB

View File

Before

Width:  |  Height:  |  Size: 252 KiB

After

Width:  |  Height:  |  Size: 252 KiB

View File

@ -44,7 +44,8 @@
"spacy-101": {
"title": "spaCy 101 Everything you need to know",
"next": "lightning-tour",
"quickstart": true
"quickstart": true,
"preview": "101"
},
"lightning-tour": {