mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-03 11:22:30 +02:00
feat(v2): blog + docs multi-instance plugins (#3204)
* stable createData namespacing + second-blog dogfooding * Docs: support multi-instance + make community docs a separate instance * tests: add 2nd docs instance to versioned site * fix docs version cli tests * fix docs versioning cli * typo * team: add link to my site * better extendCli integration * fix metadata tests * tests for versioned site with second docs instance * move some validation code to utils-validation * fix missing dependency * fix bad compiled output due to importing constants in ./client folder * make docs tests easier to maintain * refactors * prevent lodash imports in client bundle * redirect old community docs to new urls
This commit is contained in:
parent
e944f35640
commit
59f705ee66
67 changed files with 2025 additions and 2059 deletions
|
@ -31,6 +31,33 @@ module.exports = {
|
|||
},
|
||||
themes: ['@docusaurus/theme-live-codeblock'],
|
||||
plugins: [
|
||||
[
|
||||
'@docusaurus/plugin-content-docs',
|
||||
{
|
||||
id: 'community',
|
||||
path: 'community',
|
||||
editUrl: 'https://github.com/facebook/docusaurus/edit/master/website/',
|
||||
routeBasePath: 'community',
|
||||
sidebarPath: require.resolve('./sidebarsCommunity.js'),
|
||||
showLastUpdateAuthor: true,
|
||||
showLastUpdateTime: true,
|
||||
},
|
||||
],
|
||||
[
|
||||
'@docusaurus/plugin-content-blog',
|
||||
{
|
||||
id: 'second-blog',
|
||||
path: 'dogfooding/second-blog',
|
||||
routeBasePath: 'second-blog',
|
||||
editUrl:
|
||||
'https://github.com/facebook/docusaurus/edit/master/website/dogfooding',
|
||||
postsPerPage: 3,
|
||||
feedOptions: {
|
||||
type: 'all',
|
||||
copyright: `Copyright © ${new Date().getFullYear()} Facebook, Inc.`,
|
||||
},
|
||||
},
|
||||
],
|
||||
[
|
||||
'@docusaurus/plugin-client-redirects',
|
||||
{
|
||||
|
@ -42,6 +69,20 @@ module.exports = {
|
|||
return [`${path}/introduction`];
|
||||
}
|
||||
},
|
||||
redirects: [
|
||||
{
|
||||
from: ['/docs/support', '/docs/next/support'],
|
||||
to: '/community/support',
|
||||
},
|
||||
{
|
||||
from: ['/docs/team', '/docs/next/team'],
|
||||
to: '/community/team',
|
||||
},
|
||||
{
|
||||
from: ['/docs/resources', '/docs/next/resources'],
|
||||
to: '/community/resources',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
[
|
||||
|
@ -116,6 +157,7 @@ module.exports = {
|
|||
'@docusaurus/preset-classic',
|
||||
{
|
||||
docs: {
|
||||
// routeBasePath: '/',
|
||||
homePageId: 'introduction',
|
||||
path: 'docs',
|
||||
sidebarPath: require.resolve('./sidebars.js'),
|
||||
|
@ -127,6 +169,7 @@ module.exports = {
|
|||
disableVersioning: !!process.env.DISABLE_VERSIONING,
|
||||
},
|
||||
blog: {
|
||||
// routeBasePath: '/',
|
||||
path: '../website-1.x/blog',
|
||||
editUrl:
|
||||
'https://github.com/facebook/docusaurus/edit/master/website-1.x/',
|
||||
|
@ -188,10 +231,10 @@ module.exports = {
|
|||
{to: 'blog', label: 'Blog', position: 'left'},
|
||||
{to: 'showcase', label: 'Showcase', position: 'left'},
|
||||
{
|
||||
to: 'docs/next/support',
|
||||
to: '/community/support',
|
||||
label: 'Community',
|
||||
position: 'left',
|
||||
activeBaseRegex: `docs/next/(support|team|resources)`,
|
||||
activeBaseRegex: `/community/`,
|
||||
},
|
||||
{
|
||||
to: '/versions',
|
||||
|
@ -243,7 +286,7 @@ module.exports = {
|
|||
},
|
||||
{
|
||||
label: 'Help',
|
||||
to: 'docs/next/support',
|
||||
to: '/community/support',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue