diff --git a/website/gatsby-config.js b/website/gatsby-config.js index 5b6ddcfc1..f0e97cf5c 100644 --- a/website/gatsby-config.js +++ b/website/gatsby-config.js @@ -14,11 +14,11 @@ const models = require('./meta/languages.json') const universe = require('./meta/universe.json') const DEFAULT_TEMPLATE = path.resolve('./src/templates/index.js') -const NIGHTLY_BRANCHES = ['spacy.io-develop'] -const isNightly = !!+process.env.SPACY_NIGHTLY || NIGHTLY_BRANCHES.includes(process.env.BRANCH) +const isNightly = !!+process.env.SPACY_NIGHTLY || site.nightlyBranches.includes(process.env.BRANCH) const favicon = isNightly ? `src/images/icon_nightly.png` : `src/images/icon.png` const binderBranch = isNightly ? 'nightly' : site.binderBranch +const siteUrl = isNightly ? site.siteUrlNightly : site.siteUrl module.exports = { siteMetadata: { @@ -29,6 +29,7 @@ module.exports = { universe, nightly: isNightly, binderBranch, + siteUrl, }, plugins: [ diff --git a/website/meta/site.json b/website/meta/site.json index 8b8424f82..ed78b1802 100644 --- a/website/meta/site.json +++ b/website/meta/site.json @@ -3,6 +3,8 @@ "description": "spaCy is a free open-source library for Natural Language Processing in Python. It features NER, POS tagging, dependency parsing, word vectors and more.", "slogan": "Industrial-strength Natural Language Processing in Python", "siteUrl": "https://spacy.io", + "siteUrlNightly": "https://nightly.spacy.io", + "nightlyBranches": ["spacy.io-develop"], "email": "contact@explosion.ai", "company": "Explosion AI", "companyUrl": "https://explosion.ai",