diff --git a/docusaurus.config.js b/docusaurus.config.js index 58d5b35e..f76e8fc9 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -39,7 +39,7 @@ const config = { // Base url for "Edit This Page" button on content pages editUrl: `https://github.com/${GITHUB_ORG}/${GITHUB_PROJECT}/edit/main`, // Path to custom sidebar definition(s) - //sidebarPath: require.resolve('./sidebar.js'), + sidebarPath: require.resolve("./sidebar.js"), // Plugins for remark, at the Markdown AST level remarkPlugins: [], // Plugins for rehype, at the HTML AST level @@ -75,6 +75,46 @@ const config = { }, navbar: { title: "hackmud Wiki", + items: [ + { + type: "dropdown", + label: "Upgrades", + items: [ + { + type: "docSidebar", + sidebarId: "lockSidebar", + }, + ], + }, + { + type: "dropdown", + label: "Lore", + items: [ + { + type: "docSidebar", + sidebarId: "characterSidebar", + }, + { + type: "docSidebar", + sidebarId: "eventSidebar", + }, + ], + }, + { + type: "dropdown", + label: "Scripting", + items: [ + { + type: "docSidebar", + sidebarId: "scriptsLibSidebar", + }, + { + type: "docSidebar", + sidebarId: "trustScriptsSidebar", + }, + ], + }, + ], }, footer: { copyright: diff --git a/sidebar.js b/sidebar.js index 8583d22f..d2e0d0e9 100644 --- a/sidebar.js +++ b/sidebar.js @@ -3,7 +3,76 @@ // See: https://docusaurus.io/docs/sidebar /** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ const sidebars = { - // Example sidebar that just lists all docs in - // alphabetical order from file structure in ./docs - example: [{ type: "autogenerated", dirName: "." }], + lockSidebar: [ + { + type: "category", + label: "Locks", + collapsible: false, + link: { + type: "generated-index", + title: "Locks", + description: "This is an auto-generated list of all the locks.", + slug: "upgrades/locks", + }, + items: [{ type: "autogenerated", dirName: "upgrades/locks" }], + }, + ], + characterSidebar: [ + { + type: "category", + label: "Characters", + collapsible: false, + link: { + type: "generated-index", + title: "Characters", + description: "This is an auto-generated list of all the locks.", + slug: "lore/characters", + }, + items: [{ type: "autogenerated", dirName: "lore/characters" }], + }, + ], + eventSidebar: [ + { + type: "category", + label: "Events", + collapsible: false, + link: { + type: "generated-index", + title: "Events", + description: "This is an auto-generated list of all events.", + slug: "lore/events", + }, + items: [{ type: "autogenerated", dirName: "lore/events" }], + }, + ], + scriptsLibSidebar: [ + { + type: "category", + label: "scripts.lib", + collapsible: false, + link: { + type: "generated-index", + title: "scripts.lib", + description: "This is an auto-generated list of scripts.lib functions.", + slug: "scripting/scripts_lib", + }, + items: [{ type: "autogenerated", dirName: "scripting/scripts.lib" }], + }, + ], + trustScriptsSidebar: [ + { + type: "category", + label: "Trust Scripts", + collapsible: false, + link: { + type: "generated-index", + title: "Trust Scripts", + description: "This is an auto-generated list of all trust scripts.", + slug: "scripting/trust_scripts", + }, + items: [{ type: "autogenerated", dirName: "scripting/trust scripts" }], + }, + ], }; + +module.exports = sidebars;