mirror of
https://github.com/holos-run/holos.git
synced 2026-03-20 01:04:59 +00:00
Without this patch each version of the core and author schemas are duplicated into each docs version. This is unnecessary and difficult to maintain now that we have docusaurus versioned docs enabled. This patch updates the schema generation script to check if the docs version has been released, and if so write into a markdown file in the versioned docs folder. If not, the version is written into the next version folder. This patch also updates some, but not all, document links to the md or mdx relative file paths. This is necessary to generate the correct versioned links. A nice outcome of this change is that technical docs no longer need to link to version specific pages. For example, `[Core Schema]: ./api/core.md` will always refer to the correct auto generated docs associated with the docs version.
56 lines
1.1 KiB
TypeScript
56 lines
1.1 KiB
TypeScript
import type { SidebarsConfig } from '@docusaurus/plugin-content-docs';
|
|
|
|
/**
|
|
* Creating a sidebar enables you to:
|
|
- create an ordered group of docs
|
|
- render a sidebar for each doc of that group
|
|
- provide next/previous navigation
|
|
|
|
The sidebars can be generated from the filesystem, or explicitly defined here.
|
|
|
|
Create as many sidebars as you want.
|
|
*/
|
|
const sidebars: SidebarsConfig = {
|
|
doc: [
|
|
{
|
|
label: 'Tutorial',
|
|
type: 'category',
|
|
collapsed: false,
|
|
link: { type: 'doc', id: 'tutorial' },
|
|
items: [
|
|
{
|
|
type: 'autogenerated',
|
|
dirName: 'tutorial',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
label: 'Topics',
|
|
type: 'category',
|
|
collapsed: false,
|
|
link: { type: 'doc', id: 'topics' },
|
|
items: [
|
|
{
|
|
type: 'autogenerated',
|
|
dirName: 'topics',
|
|
},
|
|
],
|
|
},
|
|
'glossary',
|
|
{
|
|
label: 'Reference',
|
|
type: 'category',
|
|
collapsed: false,
|
|
link: { type: 'doc', id: 'api' },
|
|
items: [
|
|
{
|
|
type: 'autogenerated',
|
|
dirName: 'api',
|
|
},
|
|
]
|
|
},
|
|
],
|
|
};
|
|
|
|
export default sidebars;
|