From 932dda7edd5e207477631573e49a9ff79619a640 Mon Sep 17 00:00:00 2001 From: chris Date: Thu, 25 Jul 2024 00:54:28 +0200 Subject: [PATCH] Add more index pages, fix /wiki/ not showing anything (#16) --- docusaurus.config.ts | 8 ++++---- sidebars.ts | 11 +++++++---- wiki/api/index.mdx | 28 ++++++++++++++++++++++++++++ wiki/index.mdx | 42 ++++++++++++++++++++++++++++++++++++++++++ wiki/other/index.mdx | 30 ++++++++++++++++++++++++++++++ wiki/other/root.md | 7 ------- 6 files changed, 111 insertions(+), 15 deletions(-) create mode 100644 wiki/api/index.mdx create mode 100644 wiki/index.mdx create mode 100644 wiki/other/index.mdx delete mode 100644 wiki/other/root.md diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 7c7a28f..6001655 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -96,7 +96,7 @@ const config: Config = { label: 'Wiki', className: 'header-wiki-link', position: 'left', - to: 'wiki/geyser/', + to: 'wiki/', items: [ { type: 'doc', @@ -105,17 +105,17 @@ const config: Config = { }, { type: 'doc', - docId: 'floodgate/setup', + docId: 'floodgate/index', label: 'Floodgate', }, { type: 'doc', - docId: 'api/api.geysermc.org/global-api', + docId: 'api/index', label: 'REST APIs', }, { type: 'doc', - docId: 'other/geyseroptionalpack', + docId: 'other/index', label: 'Other', }, ] diff --git a/sidebars.ts b/sidebars.ts index 8a91b3d..1171e27 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -13,6 +13,7 @@ import type { SidebarsConfig } from '@docusaurus/plugin-content-docs'; const sidebars: SidebarsConfig = { // By default, Docusaurus generates a sidebar from the docs folder structure apiSidebar: [ + "api/index", { type: "category", label: "api.geysermc.org", @@ -130,14 +131,16 @@ const sidebars: SidebarsConfig = { ], otherSidebar: [ - 'other/geyseroptionalpack', - 'other/hurricane', + 'other/index', 'other/geyserconnect', + 'other/thirdpartycosmetics', + 'other/geyseroptionalpack', 'other/community-geyser-projects', + 'other/hurricane', + 'other/hydraulic', 'other/test-server', 'other/developer-guide', - 'other/discord-bot-usage', - 'other/hydraulic' + 'other/discord-bot-usage' ] }; diff --git a/wiki/api/index.mdx b/wiki/api/index.mdx new file mode 100644 index 0000000..8d86ab6 --- /dev/null +++ b/wiki/api/index.mdx @@ -0,0 +1,28 @@ +--- +title: Overview +permalink: /api/ +description: 'These REST APIs provide web endpoints to query different information.' +--- + +import DocCardList from '@theme/DocCardList' + +# Overview of available REST APIs + +Currently, there are two different Rest APIs you can use. + + \ No newline at end of file diff --git a/wiki/index.mdx b/wiki/index.mdx new file mode 100644 index 0000000..916b6f4 --- /dev/null +++ b/wiki/index.mdx @@ -0,0 +1,42 @@ +--- +title: Overview of this wiki +permalink: /wiki/ +description: 'This page provides an overview over all sections of the GeyserMC wiki' +--- + +import DocCardList from '@theme/DocCardList' + +# Overview + +The GeyserMC wiki offers guides on different projects. Select the one you are interested in below! + + \ No newline at end of file diff --git a/wiki/other/index.mdx b/wiki/other/index.mdx new file mode 100644 index 0000000..953e7ed --- /dev/null +++ b/wiki/other/index.mdx @@ -0,0 +1,30 @@ +--- +title: Overview +permalink: /other/ +description: 'Other projects or guides not directly referring to Geyser or Floodgate.' +--- + +import DocCardList from '@theme/DocCardList' +import { useDocById } from '@docusaurus/theme-common/internal' + +# Overview of Other projects + +The "other" category provides you with information about different projects that are not Geyser or Floodgate. +This includes community projects, but also other projects by the GeyserMC team, such as Hurricane or Hydraulic. + + { + const metadata = useDocById("other/" + id) + return { + type: 'link', + label: metadata.title, + href: id, + docId: 'other/' + id + } +})} /> \ No newline at end of file diff --git a/wiki/other/root.md b/wiki/other/root.md deleted file mode 100644 index 87fa56b..0000000 --- a/wiki/other/root.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: Other -permalink: /other/ -description: Information about other Geyser-related projects. ---- - -# Other \ No newline at end of file