diff --git a/docusaurus.config.js b/docusaurus.config.js index 7be4be5ee40..2e4b46a35c5 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -95,6 +95,36 @@ const config = { showLastUpdateTime: true, }), ], + [ + '@docusaurus/plugin-content-docs', + ({ + id: 'storage', + path: 'docs/storage', + routeBasePath: 'storage', + editUrl: (params) => { + return 'https://github.com/gofiber/storage/edit/main/' + params.docPath; + }, + editCurrentVersion: true, + sidebarPath: require.resolve('./sidebarsStorage.js'), + showLastUpdateAuthor: false, + showLastUpdateTime: true, + }), + ], + [ + '@docusaurus/plugin-content-docs', + ({ + id: 'template', + path: 'docs/template', + routeBasePath: 'template', + editUrl: (params) => { + return 'https://github.com/gofiber/template/edit/main/' + params.docPath; + }, + editCurrentVersion: true, + sidebarPath: require.resolve('./sidebarsTemplate.js'), + showLastUpdateAuthor: false, + showLastUpdateTime: true, + }), + ], ], presets: [ @@ -156,8 +186,16 @@ const config = { type: 'docsVersion', label: 'Contrib', docsPluginId: 'contrib', + }, { + type: 'docsVersion', + label: 'Storage', + docsPluginId: 'storage', + }, { + type: 'docsVersion', + label: 'Template', + docsPluginId: 'template', }], - }, + }, { to: 'https://gofiber.io/support', label: '☕ Donate', diff --git a/sidebarsStorage.js b/sidebarsStorage.js new file mode 100644 index 00000000000..5d6a1510fa2 --- /dev/null +++ b/sidebarsStorage.js @@ -0,0 +1,22 @@ +/** + * 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. + */ + +// @ts-check + +/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ +const sidebars = { + tutorialSidebar: [{ + type: 'autogenerated', + dirName: '.' + }], +}; + +module.exports = sidebars; diff --git a/sidebarsTemplate.js b/sidebarsTemplate.js new file mode 100644 index 00000000000..5d6a1510fa2 --- /dev/null +++ b/sidebarsTemplate.js @@ -0,0 +1,22 @@ +/** + * 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. + */ + +// @ts-check + +/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ +const sidebars = { + tutorialSidebar: [{ + type: 'autogenerated', + dirName: '.' + }], +}; + +module.exports = sidebars;