From af35a89dd16fbcea7b4e40c2a15f2f38d6168a1f Mon Sep 17 00:00:00 2001 From: ghambhackmud Date: Tue, 10 Oct 2023 13:24:44 -0400 Subject: [PATCH 1/4] Adds navbar stuff --- docusaurus.config.js | 42 +++++++++++++++++++++++++++--- sidebar.js | 61 +++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 97 insertions(+), 6 deletions(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index 58d5b35e..ad332840 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 8583d22f..f4a18641 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; From ba8f6d21dfce3d27b5a4595da48ef2b8302124b3 Mon Sep 17 00:00:00 2001 From: seanmakesgames Date: Wed, 6 Dec 2023 16:36:15 -0800 Subject: [PATCH 2/4] revert footer --- docusaurus.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index ad332840..9e29a722 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -113,7 +113,8 @@ const config = { ], }, footer: { - copyright: `Copyright © ${new Date().getFullYear()} ComCODE`, + copyright: + 'Licensed by ComCODE with CC BY-NC-SA 4.0 for creative and educational use.', links: [], }, }, From 60c36b049438f93ada492619b1efe2dea9034195 Mon Sep 17 00:00:00 2001 From: seanmakesgames Date: Thu, 7 Dec 2023 00:38:20 +0000 Subject: [PATCH 3/4] remove unintentional add of links --- docusaurus.config.js | 1 - 1 file changed, 1 deletion(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index 9e29a722..bc46ca34 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -115,7 +115,6 @@ const config = { footer: { copyright: 'Licensed by ComCODE with CC BY-NC-SA 4.0 for creative and educational use.', - links: [], }, }, From 34bdcd285e3b6f6cdc037cd883b9916fbd81bce3 Mon Sep 17 00:00:00 2001 From: seanmakesgames Date: Thu, 7 Dec 2023 00:54:43 +0000 Subject: [PATCH 4/4] match style of other navbar menus --- docusaurus.config.js | 6 +++++- sidebar.js | 26 ++++++++++++++++++++------ 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index bc46ca34..f76e8fc9 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -106,7 +106,11 @@ const config = { items: [ { type: "docSidebar", - sidebarId: "scriptingSidebar", + sidebarId: "scriptsLibSidebar", + }, + { + type: "docSidebar", + sidebarId: "trustScriptsSidebar", }, ], }, diff --git a/sidebar.js b/sidebar.js index f4a18641..d2e0d0e9 100644 --- a/sidebar.js +++ b/sidebar.js @@ -45,18 +45,32 @@ const sidebars = { items: [{ type: "autogenerated", dirName: "lore/events" }], }, ], - scriptingSidebar: [ + scriptsLibSidebar: [ { type: "category", - label: "scripting", + label: "scripts.lib", collapsible: false, link: { type: "generated-index", - title: "Events", - description: "This is an auto-generated list of all events.", - slug: "scripting", + 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" }], + items: [{ type: "autogenerated", dirName: "scripting/trust scripts" }], }, ], };