diff --git a/docusaurus.config.js b/docusaurus.config.js index 58d5b35eb..ad3328401 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,10 +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: "scriptingSidebar", + }, + ], + }, + ], }, footer: { - copyright: - 'Licensed by ComCODE with CC BY-NC-SA 4.0 for creative and educational use.', + copyright: `Copyright © ${new Date().getFullYear()} ComCODE`, + links: [], }, }, diff --git a/sidebar.js b/sidebar.js index 8583d22ff..f4a186414 100644 --- a/sidebar.js +++ b/sidebar.js @@ -3,7 +3,62 @@ // 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" }], + }, + ], + scriptingSidebar: [ + { + type: "category", + label: "scripting", + collapsible: false, + link: { + type: "generated-index", + title: "Events", + description: "This is an auto-generated list of all events.", + slug: "scripting", + }, + items: [{ type: "autogenerated", dirName: "scripting" }], + }, + ], }; + +module.exports = sidebars;