forked from i2pgram/rasa
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into 6505_rasa_convert_bugs
- Loading branch information
Showing
38 changed files
with
3,547 additions
and
2,602 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Local Netlify folder | ||
.netlify |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,108 +1,148 @@ | ||
const path = require('path'); | ||
const remarkSources = require('remark-sources'); | ||
const remarkCollapse = require('remark-collapse'); | ||
const { remarkProgramOutput } = require("./plugins/program_output"); | ||
const { remarkProgramOutput } = require('./plugins/program_output'); | ||
const { | ||
rehypePlugins: themeRehypePlugins, | ||
remarkPlugins: themeRemarkPlugins, | ||
} = require('@rasahq/docusaurus-theme-tabula'); | ||
|
||
|
||
// FIXME: remove "next/" when releasing + remove the "next/" in | ||
// http://github.com/RasaHQ/rasa-website/blob/master/netlify.toml | ||
const BASE_URL = '/docs/rasa/next/'; | ||
const SITE_URL = 'https://rasa.com'; | ||
|
||
// NOTE: this allows switching between local dev instances of rasa/rasa-x | ||
const isDev = process.env.NODE_ENV === 'development'; | ||
const SWAP_URL = isDev ? 'http://localhost:3001' : SITE_URL; | ||
|
||
/* VERSIONING: WIP */ | ||
|
||
const routeBasePath = '/'; | ||
let versions = []; | ||
try { | ||
versions = require('./versions.json'); | ||
} catch (ex) { | ||
// Nothing to do here, in dev mode, only | ||
// one version of the doc is available | ||
} | ||
try { versions = require('./versions.json'); } catch (ex) { console.info('no versions.json file found; assuming dev mode.') } | ||
|
||
const legacyVersion = { | ||
label: 'Legacy 1.x', | ||
to: 'https://legacy-docs-v1.rasa.com', | ||
href: 'https://legacy-docs-v1.rasa.com', | ||
target: '_self', | ||
}; | ||
|
||
const allVersions = { | ||
label: 'Versions', | ||
to: '/', // "fake" link | ||
position: 'left', | ||
items: versions.length > 0 ? [ | ||
{ | ||
label: versions[0], | ||
to: '/', | ||
activeBaseRegex: versions[0], | ||
}, | ||
...versions.slice(1).map((version) => ({ | ||
label: version, | ||
to: `${version}/`, | ||
activeBaseRegex: version, | ||
})), | ||
{ | ||
label: 'Master/Unreleased', | ||
to: 'next/', | ||
activeBaseRegex: `next`, | ||
}, | ||
legacyVersion, | ||
] | ||
: [ | ||
{ | ||
label: 'Master/Unreleased', | ||
to: '/', | ||
activeBaseRegex: `/`, | ||
}, | ||
legacyVersion, | ||
], | ||
} | ||
|
||
module.exports = { | ||
customFields: { | ||
// NOTE: all non-standard options should go in this object | ||
}, | ||
title: 'Rasa Open Source Documentation', | ||
tagline: 'Rasa Open Source Documentation', | ||
url: 'https://rasa.com', | ||
// FIXME: when deploying this for real, change to '/docs/rasa/' | ||
baseUrl: '/docs/rasa/next/', | ||
favicon: 'img/favicon.ico', | ||
tagline: 'An open source machine learning framework for automated text and voice-based conversations', | ||
url: SITE_URL, | ||
baseUrl: BASE_URL, | ||
favicon: '/img/favicon.ico', | ||
organizationName: 'RasaHQ', | ||
projectName: 'rasa', | ||
themeConfig: { | ||
colorMode: { | ||
defaultMode: 'light', | ||
disableSwitch: true, | ||
}, | ||
navbar: { | ||
hideOnScroll: false, | ||
title: 'Rasa Open Source', | ||
logo: { | ||
alt: 'Rasa', | ||
src: 'https://rasa.com/static/60e441f8eadef13bea0cc790c8cf188b/rasa-logo.svg', | ||
alt: 'Rasa Logo', | ||
src: `/img/rasa-logo.svg`, | ||
href: SITE_URL, | ||
}, | ||
items: [ | ||
{ | ||
label: 'Docs', | ||
to: '/', // "fake" link | ||
label: 'Rasa Open Source', | ||
to: path.join('/', BASE_URL), | ||
position: 'left', | ||
}, | ||
{ | ||
label: 'Rasa X', | ||
position: 'left', | ||
items: versions.length > 0 ? [ | ||
{ | ||
label: versions[0], | ||
to: '/', | ||
activeBaseRegex: versions[0], | ||
}, | ||
...versions.slice(1).map((version) => ({ | ||
label: version, | ||
to: `${version}/`, | ||
activeBaseRegex: version, | ||
})), | ||
{ | ||
label: 'Master/Unreleased', | ||
to: 'next/', | ||
activeBaseRegex: `next`, | ||
}, | ||
legacyVersion, | ||
] : [ | ||
{ | ||
label: 'Master/Unreleased', | ||
to: '/', | ||
activeBaseRegex: `/`, | ||
}, | ||
legacyVersion, | ||
], | ||
href: `${SWAP_URL}/docs/rasa-x/next/`, | ||
target: '_self', | ||
}, | ||
{ | ||
href: 'https://github.com/rasahq/rasa', | ||
label: 'GitHub', | ||
target: '_self', | ||
href: 'http://blog.rasa.com/', | ||
label: 'Blog', | ||
position: 'right', | ||
}, | ||
{ | ||
target: '_self', | ||
href: `${SITE_URL}/community/join/`, | ||
label: 'Community', | ||
position: 'right', | ||
}, | ||
], | ||
}, | ||
footer: { | ||
style: 'dark', | ||
copyright: `Copyright © ${new Date().getFullYear()} Rasa Technologies GmbH`, | ||
}, | ||
gtm: { | ||
containerID: 'GTM-PK448GB', | ||
}, | ||
}, | ||
themes: [ | ||
['@docusaurus/theme-classic', { | ||
customCss: require.resolve('./src/css/custom.css'), | ||
}], | ||
path.resolve(__dirname, './themes/theme-live-codeblock'), | ||
'@rasahq/docusaurus-theme-tabula', | ||
path.resolve(__dirname, './themes/theme-custom') | ||
], | ||
plugins: [ | ||
['@docusaurus/plugin-content-docs', { | ||
// https://v2.docusaurus.io/docs/next/docs-introduction/#docs-only-mode | ||
routeBasePath: '/', | ||
// It is recommended to set document id as docs home page (`docs/` path). | ||
homePageId: 'index', | ||
['@docusaurus/plugin-content-docs/', { | ||
routeBasePath, | ||
sidebarPath: require.resolve('./sidebars.js'), | ||
editUrl: 'https://github.com/rasahq/rasa/edit/master/docs/', | ||
showLastUpdateTime: true, | ||
showLastUpdateAuthor: true, | ||
rehypePlugins: [ | ||
...themeRehypePlugins, | ||
], | ||
remarkPlugins: [ | ||
[ remarkCollapse, { test: '' }], | ||
remarkSources, | ||
remarkProgramOutput | ||
...themeRemarkPlugins, | ||
remarkProgramOutput, | ||
], | ||
}], | ||
['@docusaurus/plugin-sitemap', { | ||
cacheTime: 600 * 1000, // 600 sec - cache purge period | ||
changefreq: 'weekly', | ||
priority: 0.5, | ||
}], | ||
path.resolve(__dirname, './plugins/google-tagmanager'), | ||
], | ||
['@docusaurus/plugin-content-pages', {}], | ||
['@docusaurus/plugin-sitemap', | ||
{ | ||
cacheTime: 600 * 1000, // 600 sec - cache purge period | ||
changefreq: 'weekly', | ||
priority: 0.5, | ||
}], | ||
isDev && ['@docusaurus/plugin-debug', {}], | ||
[path.resolve(__dirname, './plugins/google-tagmanager'), {}], | ||
].filter(Boolean), | ||
}; |
Oops, something went wrong.