mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-26 17:24:41 +03:00
Add nightly social image [ci skip]
This commit is contained in:
parent
5d02f71653
commit
e1eb48e932
|
@ -6,6 +6,7 @@ import { StaticQuery, graphql } from 'gatsby'
|
||||||
import socialImageDefault from '../images/social_default.jpg'
|
import socialImageDefault from '../images/social_default.jpg'
|
||||||
import socialImageApi from '../images/social_api.jpg'
|
import socialImageApi from '../images/social_api.jpg'
|
||||||
import socialImageUniverse from '../images/social_universe.jpg'
|
import socialImageUniverse from '../images/social_universe.jpg'
|
||||||
|
import socialImageNightly from '../images/social_nightly.jpg'
|
||||||
|
|
||||||
function getPageTitle(title, sitename, slogan, sectionTitle) {
|
function getPageTitle(title, sitename, slogan, sectionTitle) {
|
||||||
if (sectionTitle && title) {
|
if (sectionTitle && title) {
|
||||||
|
@ -17,13 +18,14 @@ function getPageTitle(title, sitename, slogan, sectionTitle) {
|
||||||
return `${sitename} · ${slogan}`
|
return `${sitename} · ${slogan}`
|
||||||
}
|
}
|
||||||
|
|
||||||
function getImage(section) {
|
function getImage(section, nightly) {
|
||||||
|
if (nightly) return socialImageNightly
|
||||||
if (section === 'api') return socialImageApi
|
if (section === 'api') return socialImageApi
|
||||||
if (section === 'universe') return socialImageUniverse
|
if (section === 'universe') return socialImageUniverse
|
||||||
return socialImageDefault
|
return socialImageDefault
|
||||||
}
|
}
|
||||||
|
|
||||||
const SEO = ({ description, lang, title, section, sectionTitle, bodyClass }) => (
|
const SEO = ({ description, lang, title, section, sectionTitle, bodyClass, nightly }) => (
|
||||||
<StaticQuery
|
<StaticQuery
|
||||||
query={query}
|
query={query}
|
||||||
render={data => {
|
render={data => {
|
||||||
|
@ -35,7 +37,7 @@ const SEO = ({ description, lang, title, section, sectionTitle, bodyClass }) =>
|
||||||
siteMetadata.slogan,
|
siteMetadata.slogan,
|
||||||
sectionTitle
|
sectionTitle
|
||||||
)
|
)
|
||||||
const socialImage = siteMetadata.siteUrl + getImage(section)
|
const socialImage = siteMetadata.siteUrl + getImage(section, nightly)
|
||||||
const meta = [
|
const meta = [
|
||||||
{
|
{
|
||||||
name: 'description',
|
name: 'description',
|
||||||
|
|
BIN
website/src/images/social_nightly.jpg
Normal file
BIN
website/src/images/social_nightly.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 384 KiB |
|
@ -162,6 +162,7 @@ class Layout extends React.Component {
|
||||||
section={section}
|
section={section}
|
||||||
sectionTitle={sectionTitle}
|
sectionTitle={sectionTitle}
|
||||||
bodyClass={bodyClass}
|
bodyClass={bodyClass}
|
||||||
|
nightly={meta.nightly}
|
||||||
/>
|
/>
|
||||||
<AlertSpace nightly={meta.nightly} />
|
<AlertSpace nightly={meta.nightly} />
|
||||||
<Navigation
|
<Navigation
|
||||||
|
|
Loading…
Reference in New Issue
Block a user