Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds navbar stuff #13

Merged
merged 4 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 41 additions & 1 deletion 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,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:
Expand Down
75 changes: 72 additions & 3 deletions sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;