Skip to content

Commit

Permalink
Try netlify config for next
Browse files Browse the repository at this point in the history
  • Loading branch information
jtcohen6 committed Jul 28, 2020
1 parent 6f248b2 commit 2605e7d
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
12 changes: 12 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# for deployments of prerelease docs
[context.next]
command = "make build"

[context.next.environment]
ALGOLIA_INDEX_NAME = "dbt-next"
DISCLAIMER = "Prerelease "

[[headers]]
for = "/*"
[headers.values]
X-robots-tag = "noindex"
22 changes: 19 additions & 3 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,32 @@ if (!process.env.CONTEXT || process.env.CONTEXT == 'production') {
SITE_URL = process.env.DEPLOY_URL;
}

var DISCLAIMER;
if (!process.env.DISCLAIMER) {
DISCLAIMER = '';
} else {
DISCLAIMER = process.env.DISCLAIMER;
}

var ALGOLIA_INDEX_NAME;
if (!process.env.ALGOLIA_INDEX_NAME) {
ALGOLIA_INDEX_NAME = 'dbt';
} else {
ALGOLIA_INDEX_NAME = process.env.ALGOLIA_INDEX_NAME;
}

console.log("DEBUG: CONTEXT =", process.env.CONTEXT);
console.log("DEBUG: DEPLOY_URL =", process.env.DEPLOY_URL);
console.log("DEBUG: SITE_URL = ", SITE_URL);
console.log("DEBUG: DISCLAIMER = ", DISCLAIMER);
console.log("DEBUG: ALGOLIA_INDEX_NAME = ", ALGOLIA_INDEX_NAME);


module.exports = {
baseUrl: '/',
favicon: '/img/favicon.ico',
tagline: 'Your entire analytics engineering workflow',
title: 'dbt - Documentation',
title: 'dbt - ' + DISCLAIMER + 'Documentation',
url: SITE_URL,

themeConfig: {
Expand All @@ -29,7 +45,7 @@ module.exports = {
algolia: {
apiKey: '0e9665cbb272719dddc6e7113b4131a5',
//debug: true,
indexName: 'dbt',
indexName: ALGOLIA_INDEX_NAME,
algoliaOptions: {
},
},
Expand Down Expand Up @@ -62,7 +78,7 @@ module.exports = {
links: [
{
to: '/docs/introduction',
label: 'Docs',
label: DISCLAIMER + 'Docs',
position: 'left',
activeBaseRegex: 'docs\/(?!(dbt-cloud))',
},
Expand Down

0 comments on commit 2605e7d

Please sign in to comment.