mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 18:06:29 +03:00
Move social image logic out to function and move files
This commit is contained in:
parent
8fc52878f7
commit
b577ed79ee
|
@ -22,3 +22,14 @@
|
||||||
- var branch = ALPHA ? 'develop' : branch
|
- var branch = ALPHA ? 'develop' : branch
|
||||||
- return 'https://github.com/' + SOCIAL.github + '/' + repo + (filepath ? '/blob/' + (branch || 'master') + '/' + filepath : '' );
|
- 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'
|
||||||
|
- }
|
||||||
|
|
|
@ -24,13 +24,13 @@ html(lang="en")
|
||||||
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="#{title} - spaCy")
|
||||||
meta(property="og:description" content=description)
|
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: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="#{title} - spaCy")
|
||||||
meta(name="twitter:description" content=description)
|
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="shortcut icon" href="/assets/img/favicon.ico")
|
||||||
link(rel="icon" type="image/x-icon" href="/assets/img/favicon.ico")
|
link(rel="icon" type="image/x-icon" href="/assets/img/favicon.ico")
|
||||||
|
|
BIN
website/assets/img/social/preview_101.jpg
Normal file
BIN
website/assets/img/social/preview_101.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 380 KiB |
Before Width: | Height: | Size: 364 KiB After Width: | Height: | Size: 364 KiB |
Before Width: | Height: | Size: 252 KiB After Width: | Height: | Size: 252 KiB |
|
@ -44,7 +44,8 @@
|
||||||
"spacy-101": {
|
"spacy-101": {
|
||||||
"title": "spaCy 101 – Everything you need to know",
|
"title": "spaCy 101 – Everything you need to know",
|
||||||
"next": "lightning-tour",
|
"next": "lightning-tour",
|
||||||
"quickstart": true
|
"quickstart": true,
|
||||||
|
"preview": "101"
|
||||||
},
|
},
|
||||||
|
|
||||||
"lightning-tour": {
|
"lightning-tour": {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user