Skip to content

Commit

Permalink
Adds navbar stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
ghambhackmud committed Dec 6, 2023
1 parent a8658f4 commit 8fc3dbb
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 6 deletions.
42 changes: 39 additions & 3 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank" rel="noopener noreferrer">CC BY-NC-SA 4.0</a> for creative and educational use.',
copyright: `Copyright © ${new Date().getFullYear()} ComCODE`,
links: [],
},
},

Expand Down
61 changes: 58 additions & 3 deletions sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

0 comments on commit 8fc3dbb

Please sign in to comment.