Skip to content

Commit

Permalink
feat(docs): merge and enable sorting feature
Browse files Browse the repository at this point in the history
  • Loading branch information
AGDholo committed May 4, 2023
1 parent 4e3c5ff commit d881f05
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 90 deletions.
8 changes: 8 additions & 0 deletions darc-docs/docs/Overview/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "Overview",
"position": 1,
"link": {
"type": "generated-index",
"description": "Overview about darc.js"
}
}
47 changes: 0 additions & 47 deletions darc-docs/docs/intro.md

This file was deleted.

27 changes: 2 additions & 25 deletions darc-docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,31 +73,8 @@ const config = {
to: '/',
},
{
type: 'dropdown',
label: 'DARC Docs',
position: 'left',
items: [
{
type: 'docSidebar',
sidebarId: 'OverviewSiderbar',
label: 'Overview',
},
{
type: 'docSidebar',
sidebarId: 'DARCProtocolSidebar',
label: 'DARC Protocol',
},
{
type: 'docSidebar',
sidebarId: 'DARCjsSiderbar',
label: 'darc.js',
},
{
type: 'docSidebar',
sidebarId: 'blsSidebar',
label: 'By-Law Script',
},
],
label: 'Docs',
to: '/docs/Overview',
},
{
href: 'https://github.com/project-darc/darc',
Expand Down
37 changes: 19 additions & 18 deletions darc-docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,26 @@

/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
// By default, Docusaurus generates a sidebar from the docs folder structure
tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],
DARCProtocolSidebar: [{type: 'autogenerated', dirName: 'DARC-Protocol'}],
DARCjsSiderbar: [{type: 'autogenerated', dirName: 'darc.js'}],
OverviewSiderbar: [{type: 'autogenerated', dirName: 'Overview'}],
blsSidebar: [{type: 'autogenerated', dirName: 'By-Law-Script'}],
// By default, Docusaurus generates a sidebar from the docs folder structure
tutorialSidebar: [
{
type: 'autogenerated',
dirName: '.', // '.' means the current docs folder
},
],

// But you can create a sidebar manually
/*
tutorialSidebar: [
'intro',
'hello',
{
type: 'category',
label: 'Tutorial',
items: ['tutorial-basics/create-a-document'],
},
],
*/
// But you can create a sidebar manually
/*
tutorialSidebar: [
'intro',
'hello',
{
type: 'category',
label: 'Tutorial',
items: ['tutorial-basics/create-a-document'],
},
],
*/
};

module.exports = sidebars;

0 comments on commit d881f05

Please sign in to comment.