Files

169 lines
4.8 KiB
TypeScript
Raw Permalink Normal View History

2024-01-25 22:38:57 -08:00
import type { SidebarsConfig } from '@docusaurus/plugin-content-docs';
import type { SidebarItemConfig } from "@docusaurus/plugin-content-docs/src/sidebars/types.js";
2023-11-07 19:40:55 -06:00
/**
* Creating a sidebar enables you to:
- create an ordered group of docs
- render a sidebar for each doc of that group
- provide next/previous navigation
The sidebars can be generated from the filesystem, or explicitly defined here.
Create as many sidebars as you want.
*/
const sidebars: SidebarsConfig = {
2024-01-25 22:38:57 -08:00
// By default, Docusaurus generates a sidebar from the docs folder structure
apiSidebar: withUniqueKeys([
"api/index",
2024-03-12 15:38:42 +00:00
{
type: "category",
label: "api.geysermc.org",
link: {
type: "generated-index",
title: "Global API",
description: "Global API",
slug: "/api/global",
},
2024-07-18 10:38:53 +01:00
items: require("./wiki/api/api.geysermc.org/sidebar.ts"),
2024-03-12 15:38:42 +00:00
},
{
type: "category",
label: "download.geysermc.org",
link: {
type: "generated-index",
title: "Downloads API",
description: "Downloads API",
slug: "/api/downloads",
},
2024-07-18 10:38:53 +01:00
items: require("./wiki/api/downloads.geysermc.org/sidebar.ts"),
2024-03-12 15:38:42 +00:00
},
]),
2024-01-25 22:38:57 -08:00
geyserSidebar: [
2024-07-18 10:38:53 +01:00
'geyser/index',
2024-01-25 22:38:57 -08:00
{
type: 'category',
label: 'Setup',
link: {
type: 'doc',
2024-07-18 10:38:53 +01:00
id: 'geyser/setup'
2024-01-25 22:38:57 -08:00
},
items: [
// TODO: hidden until the hosting page launches
// {
// type: 'link',
// label: 'Hosting Providers',
// href: '/hosting'
// },
2024-07-18 10:38:53 +01:00
'geyser/using-geyser-with-consoles',
'geyser/nethernet-https',
'geyser/port-forwarding',
2024-07-18 10:38:53 +01:00
'geyser/creating-a-startup-script',
'geyser/playit-gg'
2024-01-25 22:38:57 -08:00
]
},
{
type: 'category',
label: 'Common Issues',
link: {
type: 'doc',
2024-07-18 10:38:53 +01:00
id: 'geyser/common-issues'
2024-01-25 22:38:57 -08:00
},
items: [
2024-07-18 10:38:53 +01:00
'geyser/fixing-unable-to-connect-to-world'
2024-01-25 22:38:57 -08:00
]
},
{
type: 'category',
label: 'Configuring Geyser',
items: [
2024-07-18 10:38:53 +01:00
'geyser/commands',
'geyser/translations',
'geyser/geyser-command-line-arguments-and-system-properties'
2024-01-25 22:38:57 -08:00
]
},
{
type: 'category',
label: 'FAQ',
link: {
type: 'doc',
2024-07-18 10:38:53 +01:00
id: 'geyser/faq'
2024-01-25 22:38:57 -08:00
},
items: [
'geyser/supported-versions',
2024-07-18 10:38:53 +01:00
'geyser/anticheat-compatibility',
'geyser/current-limitations'
2024-01-25 22:38:57 -08:00
]
},
2024-07-14 18:49:12 -07:00
{
type: 'category',
label: 'Custom Content',
2024-07-14 18:49:12 -07:00
link: {
type: 'doc',
id: 'geyser/custom-content'
2024-07-14 18:49:12 -07:00
},
items: [
'geyser/packs',
2024-07-18 10:38:53 +01:00
'geyser/custom-items',
'geyser/custom-blocks',
'geyser/custom-skulls',
'geyser/custom-waypoints',
'geyser/custom-entities'
2024-07-14 18:49:12 -07:00
]
},
2024-01-25 22:38:57 -08:00
{
type: 'category',
label: 'Geyser API',
link: {
type: 'doc',
2024-07-18 10:38:53 +01:00
id: 'geyser/api',
2024-01-25 22:38:57 -08:00
},
items: [
2024-07-18 10:38:53 +01:00
'geyser/getting-started-with-the-api',
'geyser/events',
'geyser/forms'
2024-01-25 22:38:57 -08:00
],
},
2024-07-21 20:34:00 +02:00
'geyser/extensions'
2024-01-25 22:38:57 -08:00
],
2023-11-07 19:40:55 -06:00
2024-01-25 22:38:57 -08:00
floodgateSidebar: [
2024-08-13 21:07:41 +08:00
'floodgate/index',
2024-07-18 10:38:53 +01:00
'floodgate/setup',
'floodgate/issues',
'floodgate/faq',
'floodgate/features',
'floodgate/commands',
'floodgate/api',
'floodgate/linking'
2024-01-25 22:38:57 -08:00
],
2023-11-07 19:40:55 -06:00
2024-01-25 22:38:57 -08:00
otherSidebar: [
'other/index',
2024-07-18 10:38:53 +01:00
'other/geyserconnect',
'other/thirdpartycosmetics',
2025-11-17 21:47:21 +01:00
'other/geyserintegratedpack',
2024-07-18 10:38:53 +01:00
'other/community-geyser-projects',
'other/hurricane',
'other/rainbow',
'other/hydraulic',
'other/thunder',
2024-07-18 10:38:53 +01:00
'other/test-server',
'other/developer-guide',
'other/discord-bot-usage'
2024-01-25 22:38:57 -08:00
]
2023-11-07 19:40:55 -06:00
};
function withUniqueKeys(items: SidebarItemConfig[]): SidebarItemConfig[] {
return items.map((item) => {
if (typeof item === "string") return item;
if (item.type === "doc") {
return { ...item, key: item.key ?? item.id };
}
if (item.type === "category" && Array.isArray(item.items)) {
return { ...item, items: withUniqueKeys(item.items) };
}
return item;
});
}
2023-11-07 19:40:55 -06:00
export default sidebars;