From 967ff42d71a3a19d4127eee2193e4054e8f5c39e Mon Sep 17 00:00:00 2001 From: Evan McCarthy Date: Mon, 4 Apr 2022 17:12:38 -0500 Subject: [PATCH 01/14] Refactor for multiple does plugin instances --- .yarnrc.yml | 2 + config/common.ts | 25 +++ config/footer.config.ts | 2 +- config/navbar.config.ts | 19 +- config/sidebar.common.ts | 8 + config/sidebar.paper.ts | 39 ++++ config/sidebar.velocity.ts | 71 +++++++ config/sidebar.waterfall.ts | 8 + config/sidebars.config.ts | 155 --------------- docs/{papermc => common}/assets.md | 2 +- docs/common/common.md | 3 + docs/{papermc => common}/contact.md | 0 docs/{papermc => common}/downloads-api.md | 0 .../papermc-logomark-500.png} | Bin docs/paper/getting-started/README.md | 2 +- .../creating-your-first-plugin.md | 4 +- docs/velocity/getting-started/README.md | 2 +- docusaurus.config.ts | 89 ++++++--- package.json | 11 +- src/components/Projects.tsx | 6 + src/css/custom.css | 8 + src/css/index.module.css | 5 +- .../package.json | 2 +- static/img/logo-marker-dark.svg | 29 +++ static/img/logo-marker-light.svg | 30 +++ static/img/logo.svg | 19 -- tsconfig.json | 6 - yarn.lock | 185 +++++++----------- 28 files changed, 397 insertions(+), 335 deletions(-) create mode 100644 config/common.ts create mode 100644 config/sidebar.common.ts create mode 100644 config/sidebar.paper.ts create mode 100644 config/sidebar.velocity.ts create mode 100644 config/sidebar.waterfall.ts delete mode 100644 config/sidebars.config.ts rename docs/{papermc => common}/assets.md (96%) create mode 100644 docs/common/common.md rename docs/{papermc => common}/contact.md (100%) rename docs/{papermc => common}/downloads-api.md (100%) rename docs/{papermc/papermc_logomark_500.png => common/papermc-logomark-500.png} (100%) create mode 100644 static/img/logo-marker-dark.svg create mode 100644 static/img/logo-marker-light.svg delete mode 100644 static/img/logo.svg delete mode 100644 tsconfig.json diff --git a/.yarnrc.yml b/.yarnrc.yml index 5c3cc95f3..3b5438695 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -13,4 +13,6 @@ plugins: - path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs spec: "@yarnpkg/plugin-typescript" +defaultSemverRangePrefix: "" + yarnPath: .yarn/releases/yarn-3.2.0.cjs diff --git a/config/common.ts b/config/common.ts new file mode 100644 index 000000000..6e5a182c2 --- /dev/null +++ b/config/common.ts @@ -0,0 +1,25 @@ +import { SidebarsConfig } from "@docusaurus/plugin-content-docs"; + +const sidebarType: SidebarsConfig = { + sidebar: [], +}; + +export const sidebar: typeof sidebarType.sidebar = [ + { + type: "category", + collapsed: true, + label: "Getting Help", + items: [ + { + type: "link", + label: "Discord", + href: "https://discord.gg/papermc", + }, + { + type: "link", + label: "Forums", + href: "https://forums.papermc.io", + }, + ], + }, +]; diff --git a/config/footer.config.ts b/config/footer.config.ts index a61927122..c22e0459f 100644 --- a/config/footer.config.ts +++ b/config/footer.config.ts @@ -51,7 +51,7 @@ const footer: Footer = { ], }, ], - copyright: `Copyright © ${new Date().getFullYear()} PaperMC and Contributors`, + copyright: `Copyright © ${new Date().getFullYear()} PaperMC and Contributors. Built with Docusaurus.`, }; export default footer; diff --git a/config/navbar.config.ts b/config/navbar.config.ts index 605b5c87a..944ebcbc9 100644 --- a/config/navbar.config.ts +++ b/config/navbar.config.ts @@ -1,11 +1,13 @@ -import {Navbar} from "@docusaurus/theme-common"; +import { Navbar } from "@docusaurus/theme-common"; -const navbar: Omit = { // don't specify style here, we want it to be dynamic - title: "PaperMC Docs", - hideOnScroll: true, +// don't specify style here, we want it to be dynamic +const navbar: Omit = { logo: { - src: "img/logo.svg", - alt: "PaperMC Logo", + src: "img/logo-marker-light.svg", + srcDark: "img/logo-marker-dark.svg", + width: 130, + height: 32, + alt: "PaperMC Docs", }, items: [ { @@ -23,6 +25,11 @@ const navbar: Omit = { // don't specify style here, we want it label: "Waterfall", position: "left", }, + { + to: "common", + label: "Common", + position: "left", + }, { to: "https://papermc.io/downloads", label: "Downloads", diff --git a/config/sidebar.common.ts b/config/sidebar.common.ts new file mode 100644 index 000000000..949c2076f --- /dev/null +++ b/config/sidebar.common.ts @@ -0,0 +1,8 @@ +import type { SidebarsConfig } from "@docusaurus/plugin-content-docs"; +import { sidebar } from "./common"; + +const sidebars: SidebarsConfig = { + primary: [...sidebar, "common", "java-install", "downloads-api", "assets", "contact"], +}; + +export = sidebars; diff --git a/config/sidebar.paper.ts b/config/sidebar.paper.ts new file mode 100644 index 000000000..0962fed31 --- /dev/null +++ b/config/sidebar.paper.ts @@ -0,0 +1,39 @@ +import type { SidebarsConfig } from "@docusaurus/plugin-content-docs"; +import { sidebar } from "./common"; + +const sidebars: SidebarsConfig = { + primary: [ + ...sidebar, + "README", + { + type: "category", + label: "Getting Started", + link: { + type: "doc", + id: "getting-started/README", + }, + items: [ + { type: "ref", id: "getting-started/README" }, + "getting-started/adding-plugins", + "getting-started/migration", + ], + }, + { + type: "category", + label: "How-to Guides", + items: [ + "how-to/per-world-configuration", + "how-to/update", + "how-to/aikars-flags", + "how-to/anti-xray", + ], + }, + { + type: "category", + label: "Reference", + items: ["reference/paper-global-configuration", "reference/paper-per-world-configuration"], + }, + ], +}; + +export = sidebars; diff --git a/config/sidebar.velocity.ts b/config/sidebar.velocity.ts new file mode 100644 index 000000000..bb4f181cd --- /dev/null +++ b/config/sidebar.velocity.ts @@ -0,0 +1,71 @@ +import type { SidebarsConfig } from "@docusaurus/plugin-content-docs"; +import { sidebar } from "./common"; + +const sidebars: SidebarsConfig = { + primary: [ + ...sidebar, + "README", + { + type: "category", + label: "Getting Started", + link: { + type: "doc", + id: "getting-started/README", + }, + items: [ + { type: "ref", id: "getting-started/README" }, + "getting-started/why-velocity", + "getting-started/forwarding", + "getting-started/faq", + ], + }, + { + type: "category", + label: "How-to Guides", + items: ["how-to/security", "how-to/tuning", "how-to/migration"], + }, + { + type: "category", + label: "Reference", + items: [ + "reference/configuration", + "reference/commands", + "reference/server-compatibility", + "reference/comparison", + "reference/libraries", + ], + }, + { + type: "category", + label: "Developers", + link: { + type: "doc", + id: "developers/README", + }, + items: [ + { type: "ref", id: "developers/README" }, + { + type: "category", + label: "Getting Started", + items: [ + "developers/getting-started/creating-your-first-plugin", + "developers/getting-started/api-basics", + "developers/getting-started/pitfalls", + ], + }, + { + type: "category", + label: "How-to Guides", + items: ["developers/how-to/dependencies", "developers/how-to/porting-from-velocity-1"], + }, + { + type: "category", + label: "API", + items: ["developers/api/event", "developers/api/command", "developers/api/scheduler"], + }, + ], + }, + ], +}; + +export = sidebars; diff --git a/config/sidebar.waterfall.ts b/config/sidebar.waterfall.ts new file mode 100644 index 000000000..9a9765048 --- /dev/null +++ b/config/sidebar.waterfall.ts @@ -0,0 +1,8 @@ +import type { SidebarsConfig } from "@docusaurus/plugin-content-docs"; +import { sidebar } from "./common"; + +const sidebars: SidebarsConfig = { + primary: [...sidebar, "README", "getting-started", "configuration"], +}; + +export = sidebars; diff --git a/config/sidebars.config.ts b/config/sidebars.config.ts deleted file mode 100644 index 94d90e1a1..000000000 --- a/config/sidebars.config.ts +++ /dev/null @@ -1,155 +0,0 @@ -import type { SidebarsConfig } from "@docusaurus/plugin-content-docs"; - -const sidebars: SidebarsConfig = { - docs: [ - { - type: "link", - label: "Support Discord", - href: "https://discord.gg/papermc", - }, - "README", - { - type: "category", - label: "Paper", - link: { - type: "doc", - id: "paper/README", - }, - items: [ - { - type: "category", - label: "Getting Started", - link: { - type: "doc", - id: "paper/getting-started/README", - }, - items: [ - { type: "ref", id: "paper/getting-started/README" }, - "paper/getting-started/adding-plugins", - "paper/getting-started/migration", - ], - }, - { - type: "category", - label: "How-to Guides", - items: [ - "paper/how-to/per-world-configuration", - "paper/how-to/anti-xray", - "paper/how-to/update", - "paper/how-to/aikars-flags", - ], - }, - { - type: "category", - label: "Reference", - items: [ - "paper/reference/paper-global-configuration", - "paper/reference/paper-per-world-configuration", - ], - }, - ], - }, - { - type: "category", - label: "Velocity", - link: { - type: "doc", - id: "velocity/README", - }, - items: [ - { - type: "category", - label: "Getting Started", - link: { - type: "doc", - id: "velocity/getting-started/README", - }, - items: [ - { type: "ref", id: "velocity/getting-started/README" }, - "velocity/getting-started/why-velocity", - "velocity/getting-started/forwarding", - "velocity/getting-started/faq", - ], - }, - { - type: "category", - label: "How-to Guides", - items: [ - "velocity/how-to/security", - "velocity/how-to/tuning", - "velocity/how-to/migration", - ], - }, - { - type: "category", - label: "Reference", - items: [ - "velocity/reference/configuration", - "velocity/reference/commands", - "velocity/reference/server-compatibility", - "velocity/reference/comparison", - "velocity/reference/libraries", - ], - }, - { - type: "category", - label: "Developers", - link: { - type: "doc", - id: "velocity/developers/README", - }, - items: [ - { type: "ref", id: "velocity/developers/README" }, - { - type: "category", - label: "Getting Started", - items: [ - "velocity/developers/getting-started/creating-your-first-plugin", - "velocity/developers/getting-started/api-basics", - "velocity/developers/getting-started/pitfalls", - ], - }, - { - type: "category", - label: "How-to Guides", - items: [ - "velocity/developers/how-to/dependencies", - "velocity/developers/how-to/porting-from-velocity-1", - ], - }, - { - type: "category", - label: "API", - items: [ - "velocity/developers/api/event", - "velocity/developers/api/command", - "velocity/developers/api/scheduler", - ], - }, - ], - }, - ], - }, - { - type: "category", - label: "Waterfall", - link: { - type: "doc", - id: "waterfall/README", - }, - items: ["waterfall/getting-started", "waterfall/configuration"], - }, - { - type: "category", - label: "Common", - items: ["common/java-install"], - }, - { - type: "category", - label: "PaperMC", - items: ["papermc/downloads-api", "papermc/assets", "papermc/contact"], - }, - ], -}; - -export = sidebars; diff --git a/docs/papermc/assets.md b/docs/common/assets.md similarity index 96% rename from docs/papermc/assets.md rename to docs/common/assets.md index 2fee4f10c..7a3bec7b7 100644 --- a/docs/papermc/assets.md +++ b/docs/common/assets.md @@ -28,4 +28,4 @@ You may not: - Sell the PaperMC logomark on its own or as part of other products without explicit permission. - Alter the transparency of any of the elements in the PaperMC logomark -![PaperMC logomark](papermc_logomark_500.png) +![PaperMC logomark](papermc-logomark-500.png) diff --git a/docs/common/common.md b/docs/common/common.md new file mode 100644 index 000000000..4d6643001 --- /dev/null +++ b/docs/common/common.md @@ -0,0 +1,3 @@ +# Common + +Documentation relevant to all of PaperMC. diff --git a/docs/papermc/contact.md b/docs/common/contact.md similarity index 100% rename from docs/papermc/contact.md rename to docs/common/contact.md diff --git a/docs/papermc/downloads-api.md b/docs/common/downloads-api.md similarity index 100% rename from docs/papermc/downloads-api.md rename to docs/common/downloads-api.md diff --git a/docs/papermc/papermc_logomark_500.png b/docs/common/papermc-logomark-500.png similarity index 100% rename from docs/papermc/papermc_logomark_500.png rename to docs/common/papermc-logomark-500.png diff --git a/docs/paper/getting-started/README.md b/docs/paper/getting-started/README.md index 291d4513b..cb0254411 100644 --- a/docs/paper/getting-started/README.md +++ b/docs/paper/getting-started/README.md @@ -5,7 +5,7 @@ :::tip With the release of Minecraft 1.18, Paper now requires **Java 17** to run. If you don't already have -Java 17, [it's easy to download and install](../../common/java-install.md). +Java 17, [it's easy to download and install](/java-install-update). ::: diff --git a/docs/velocity/developers/getting-started/creating-your-first-plugin.md b/docs/velocity/developers/getting-started/creating-your-first-plugin.md index 969aed336..470f78d0d 100644 --- a/docs/velocity/developers/getting-started/creating-your-first-plugin.md +++ b/docs/velocity/developers/getting-started/creating-your-first-plugin.md @@ -17,8 +17,8 @@ recommend you learn some basic Java before you continue. ## Set up your environment -You're going to need the [JDK](../../../common/java-install.md) and an IDE. If you don't have an -IDE, IntelliJ IDEA is recommended. +You're going to need the [JDK](/java-install-update) and an IDE. If you don't have an IDE, IntelliJ +IDEA is recommended. ## Creating the project in your IDE diff --git a/docs/velocity/getting-started/README.md b/docs/velocity/getting-started/README.md index f94832381..23c588a72 100644 --- a/docs/velocity/getting-started/README.md +++ b/docs/velocity/getting-started/README.md @@ -6,7 +6,7 @@ This page covers how to install and set up a minimal configuration of Velocity. Velocity is written in Java, so if you do not already have Java installed, you will need to install it before you continue. Velocity requires Java 11 or newer. See our -[java installation guide](../../common/java-install.md) for detailed instructions. +[java installation guide](/java-install-update) for detailed instructions. ## Downloading Velocity diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 7a4ce33d9..dbacb51c6 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -1,4 +1,5 @@ import type { Config } from "@docusaurus/types"; +import type { Options } from "@docusaurus/plugin-content-docs"; import remarkA11yEmoji from "@fec/remark-a11y-emoji"; import vsDark from "prism-react-renderer/themes/vsDark"; import isCI from "is-ci"; @@ -11,23 +12,31 @@ const url = isPreview ? process.env.PREVIEW_URL : "https://docs.papermc.io"; const baseUrl = isPreview ? process.env.PREVIEW_BASE_URL : "/"; const completeUrl = url + baseUrl; +const docsCommon: Options = { + breadcrumbs: true, + editUrl: ({ docPath }) => `https://github.com/PaperMC/docs/blob/main/docs/${docPath}`, + editCurrentVersion: true, + sidebarCollapsible: true, + sidebarCollapsed: false, + remarkPlugins: [remarkA11yEmoji], + showLastUpdateAuthor: true, + showLastUpdateTime: true, +}; + const config: Config = { title: "PaperMC Documentation", - tagline: "Documentation for projects within the PaperMC organization.", - customFields: { - description: - "Documentation for all projects under the PaperMC umbrella, including Paper, Velocity, and Waterfall.", - }, + tagline: + "Documentation for all projects under the PaperMC umbrella, including Paper, Velocity, and Waterfall.", url: url, baseUrl: baseUrl, onBrokenLinks: isCI ? "throw" : "warn", onBrokenMarkdownLinks: isCI ? "throw" : "warn", onDuplicateRoutes: isCI ? "throw" : "error", favicon: "img/favicon.ico", - organizationName: "PaperMC", - projectName: "docs", trailingSlash: false, noIndex: isPreview, + baseUrlIssueBanner: false, + clientModules: [require.resolve("./src/css/custom.css")], webpack: { jsLoader: (isServer) => ({ @@ -47,31 +56,65 @@ const config: Config = { }), }, - presets: [ + themes: [ [ "classic", { - debug: !isCI || isPreview, - theme: { - customCss: [require.resolve("./src/css/custom.css")], - }, - docs: { - editUrl: ({ docPath }) => `https://github.com/PaperMC/docs/blob/main/docs/${docPath}`, - showLastUpdateAuthor: true, - showLastUpdateTime: true, - sidebarCollapsible: true, - remarkPlugins: [remarkA11yEmoji], - routeBasePath: "/", - sidebarPath: require.resolve("./config/sidebars.config"), - }, - blog: false, + respectPrefersColorScheme: true, }, ], + "@docusaurus/theme-search-algolia", ], plugins: [ [ - "@docusaurus/plugin-pwa", + "content-docs", + { + ...docsCommon, + id: "common", + path: "docs/common", + routeBasePath: "/", + sidebarPath: require.resolve("./config/sidebar.common"), + }, + ], + [ + "content-docs", + { + ...docsCommon, + id: "paper", + path: "docs/paper", + routeBasePath: "paper", + sidebarPath: require.resolve("./config/sidebar.paper"), + }, + ], + [ + "content-docs", + { + ...docsCommon, + id: "velocity", + path: "docs/velocity", + routeBasePath: "velocity", + sidebarPath: require.resolve("./config/sidebar.velocity"), + }, + ], + [ + "content-docs", + { + ...docsCommon, + id: "waterfall", + path: "docs/waterfall", + routeBasePath: "waterfall", + sidebarPath: require.resolve("./config/sidebar.waterfall"), + }, + ], + [ + "content-pages", + { + remarkPlugins: [remarkA11yEmoji], + }, + ], + [ + "pwa", { offlineModeActivationStrategies: ["appInstalled", "standalone", "queryString"], pwaHead: [ diff --git a/package.json b/package.json index 7855462ab..5712fe508 100644 --- a/package.json +++ b/package.json @@ -16,9 +16,14 @@ }, "dependencies": { "@docusaurus/core": "2.0.0-beta.18", + "@docusaurus/plugin-content-docs": "2.0.0-beta.18", + "@docusaurus/plugin-content-pages": "2.0.0-beta.18", + "@docusaurus/plugin-debug": "2.0.0-beta.18", "@docusaurus/plugin-pwa": "2.0.0-beta.18", - "@docusaurus/preset-classic": "2.0.0-beta.18", + "@docusaurus/plugin-sitemap": "2.0.0-beta.18", + "@docusaurus/theme-classic": "2.0.0-beta.18", "@docusaurus/theme-common": "2.0.0-beta.18", + "@docusaurus/theme-search-algolia": "2.0.0-beta.18", "@mdx-js/react": "1.6.22", "clsx": "1.1.1", "docusaurus-plugin-custom-tags": "workspace:^", @@ -31,13 +36,13 @@ "@docusaurus/types": "2.0.0-beta.18", "@fec/remark-a11y-emoji": "3.1.0", "@swc/cli": "0.1.57", - "@swc/core": "1.2.161", + "@swc/core": "1.2.163", "@tsconfig/docusaurus": "1.0.5", "@types/is-ci": "3.0.0", "@types/node": "17.0.23", "@types/prettier": "2.4.4", "is-ci": "3.0.1", - "prettier": "2.6.1", + "prettier": "2.6.2", "regenerator-runtime": "0.13.9", "swc-loader": "0.1.15", "typescript": "4.6.3" diff --git a/src/components/Projects.tsx b/src/components/Projects.tsx index db27a57bf..29234c0f3 100644 --- a/src/components/Projects.tsx +++ b/src/components/Projects.tsx @@ -22,6 +22,12 @@ const projects: Project[] = [ repo: "PaperMC/Waterfall", link: "/waterfall", }, + { + title: "Common", + description: "Pages shared between all PaperMC projects.", + repo: "PaperMC", + link: "/common", + }, ]; function Project(project: Project) { diff --git a/src/css/custom.css b/src/css/custom.css index 7dc4abf24..6b1f3d9fc 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -103,3 +103,11 @@ html[data-theme="dark"] { position: static; padding: 0; } + +.navbar__brand { + margin-right: 0; +} + +.navbar__logo { + margin: 0; +} diff --git a/src/css/index.module.css b/src/css/index.module.css index cb48ca061..724aca8a9 100644 --- a/src/css/index.module.css +++ b/src/css/index.module.css @@ -1,8 +1,11 @@ .heroBanner { - padding-top: 5rem; + padding-top: 4rem; text-align: center; position: relative; overflow: hidden; + margin: auto; + width: 85%; + max-width: 800px; } .buttons { diff --git a/src/plugins/docusaurus-plugin-custom-tags/package.json b/src/plugins/docusaurus-plugin-custom-tags/package.json index 218e1b040..0da96ebe0 100644 --- a/src/plugins/docusaurus-plugin-custom-tags/package.json +++ b/src/plugins/docusaurus-plugin-custom-tags/package.json @@ -10,7 +10,7 @@ "devDependencies": { "@docusaurus/types": "2.0.0-beta.18", "@swc/cli": "0.1.57", - "@swc/core": "1.2.161", + "@swc/core": "1.2.163", "@types/node": "17.0.23", "typescript": "4.6.3" } diff --git a/static/img/logo-marker-dark.svg b/static/img/logo-marker-dark.svg new file mode 100644 index 000000000..2e979ffbc --- /dev/null +++ b/static/img/logo-marker-dark.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/img/logo-marker-light.svg b/static/img/logo-marker-light.svg new file mode 100644 index 000000000..9abf5b2a9 --- /dev/null +++ b/static/img/logo-marker-light.svg @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/img/logo.svg b/static/img/logo.svg deleted file mode 100644 index 245857a04..000000000 --- a/static/img/logo.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index 57bbce401..000000000 --- a/tsconfig.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "@tsconfig/docusaurus/tsconfig.json", - "compilerOptions": { - "baseUrl": "." - } -} diff --git a/yarn.lock b/yarn.lock index f17b457c1..a77bda6c9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1884,34 +1884,6 @@ __metadata: languageName: node linkType: hard -"@docusaurus/plugin-google-analytics@npm:2.0.0-beta.18": - version: 2.0.0-beta.18 - resolution: "@docusaurus/plugin-google-analytics@npm:2.0.0-beta.18" - dependencies: - "@docusaurus/core": 2.0.0-beta.18 - "@docusaurus/utils-validation": 2.0.0-beta.18 - tslib: ^2.3.1 - peerDependencies: - react: ^16.8.4 || ^17.0.0 - react-dom: ^16.8.4 || ^17.0.0 - checksum: 408097362015015045340a80e8ccb7d3e8bed73d4642d19e16016cf99b352e312991dcc423497dd533c5ed456b29e05997465651dfaa4caef6160dafe4d2f214 - languageName: node - linkType: hard - -"@docusaurus/plugin-google-gtag@npm:2.0.0-beta.18": - version: 2.0.0-beta.18 - resolution: "@docusaurus/plugin-google-gtag@npm:2.0.0-beta.18" - dependencies: - "@docusaurus/core": 2.0.0-beta.18 - "@docusaurus/utils-validation": 2.0.0-beta.18 - tslib: ^2.3.1 - peerDependencies: - react: ^16.8.4 || ^17.0.0 - react-dom: ^16.8.4 || ^17.0.0 - checksum: c7dd36422b30180ef334f00d4b4bb2fc2a8403c4174f6b376acc7a1dc2d8bea74f6b864320692aed46d693b26970e7820a75bfe1d60fdd3a29b5515a4db40ef6 - languageName: node - linkType: hard - "@docusaurus/plugin-pwa@npm:2.0.0-beta.18": version: 2.0.0-beta.18 resolution: "@docusaurus/plugin-pwa@npm:2.0.0-beta.18" @@ -1958,28 +1930,6 @@ __metadata: languageName: node linkType: hard -"@docusaurus/preset-classic@npm:2.0.0-beta.18": - version: 2.0.0-beta.18 - resolution: "@docusaurus/preset-classic@npm:2.0.0-beta.18" - dependencies: - "@docusaurus/core": 2.0.0-beta.18 - "@docusaurus/plugin-content-blog": 2.0.0-beta.18 - "@docusaurus/plugin-content-docs": 2.0.0-beta.18 - "@docusaurus/plugin-content-pages": 2.0.0-beta.18 - "@docusaurus/plugin-debug": 2.0.0-beta.18 - "@docusaurus/plugin-google-analytics": 2.0.0-beta.18 - "@docusaurus/plugin-google-gtag": 2.0.0-beta.18 - "@docusaurus/plugin-sitemap": 2.0.0-beta.18 - "@docusaurus/theme-classic": 2.0.0-beta.18 - "@docusaurus/theme-common": 2.0.0-beta.18 - "@docusaurus/theme-search-algolia": 2.0.0-beta.18 - peerDependencies: - react: ^16.8.4 || ^17.0.0 - react-dom: ^16.8.4 || ^17.0.0 - checksum: ea6eb57d7374c5a522112d29901a94cbf28b25007f872e968742035e1d850d9dc54107372d0eb26035281f98c9083dce90a2e8d40952c73537ca2a12d84c7b5a - languageName: node - linkType: hard - "@docusaurus/react-loadable@npm:5.5.2, react-loadable@npm:@docusaurus/react-loadable@5.5.2": version: 5.5.2 resolution: "@docusaurus/react-loadable@npm:5.5.2" @@ -2580,114 +2530,114 @@ __metadata: languageName: node linkType: hard -"@swc/core-android-arm-eabi@npm:1.2.161": - version: 1.2.161 - resolution: "@swc/core-android-arm-eabi@npm:1.2.161" +"@swc/core-android-arm-eabi@npm:1.2.163": + version: 1.2.163 + resolution: "@swc/core-android-arm-eabi@npm:1.2.163" conditions: os=android & cpu=arm languageName: node linkType: hard -"@swc/core-android-arm64@npm:1.2.161": - version: 1.2.161 - resolution: "@swc/core-android-arm64@npm:1.2.161" +"@swc/core-android-arm64@npm:1.2.163": + version: 1.2.163 + resolution: "@swc/core-android-arm64@npm:1.2.163" conditions: os=android & cpu=arm64 languageName: node linkType: hard -"@swc/core-darwin-arm64@npm:1.2.161": - version: 1.2.161 - resolution: "@swc/core-darwin-arm64@npm:1.2.161" +"@swc/core-darwin-arm64@npm:1.2.163": + version: 1.2.163 + resolution: "@swc/core-darwin-arm64@npm:1.2.163" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@swc/core-darwin-x64@npm:1.2.161": - version: 1.2.161 - resolution: "@swc/core-darwin-x64@npm:1.2.161" +"@swc/core-darwin-x64@npm:1.2.163": + version: 1.2.163 + resolution: "@swc/core-darwin-x64@npm:1.2.163" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@swc/core-freebsd-x64@npm:1.2.161": - version: 1.2.161 - resolution: "@swc/core-freebsd-x64@npm:1.2.161" +"@swc/core-freebsd-x64@npm:1.2.163": + version: 1.2.163 + resolution: "@swc/core-freebsd-x64@npm:1.2.163" conditions: os=freebsd & cpu=x64 languageName: node linkType: hard -"@swc/core-linux-arm-gnueabihf@npm:1.2.161": - version: 1.2.161 - resolution: "@swc/core-linux-arm-gnueabihf@npm:1.2.161" +"@swc/core-linux-arm-gnueabihf@npm:1.2.163": + version: 1.2.163 + resolution: "@swc/core-linux-arm-gnueabihf@npm:1.2.163" conditions: os=linux & cpu=arm languageName: node linkType: hard -"@swc/core-linux-arm64-gnu@npm:1.2.161": - version: 1.2.161 - resolution: "@swc/core-linux-arm64-gnu@npm:1.2.161" +"@swc/core-linux-arm64-gnu@npm:1.2.163": + version: 1.2.163 + resolution: "@swc/core-linux-arm64-gnu@npm:1.2.163" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@swc/core-linux-arm64-musl@npm:1.2.161": - version: 1.2.161 - resolution: "@swc/core-linux-arm64-musl@npm:1.2.161" +"@swc/core-linux-arm64-musl@npm:1.2.163": + version: 1.2.163 + resolution: "@swc/core-linux-arm64-musl@npm:1.2.163" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@swc/core-linux-x64-gnu@npm:1.2.161": - version: 1.2.161 - resolution: "@swc/core-linux-x64-gnu@npm:1.2.161" +"@swc/core-linux-x64-gnu@npm:1.2.163": + version: 1.2.163 + resolution: "@swc/core-linux-x64-gnu@npm:1.2.163" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@swc/core-linux-x64-musl@npm:1.2.161": - version: 1.2.161 - resolution: "@swc/core-linux-x64-musl@npm:1.2.161" +"@swc/core-linux-x64-musl@npm:1.2.163": + version: 1.2.163 + resolution: "@swc/core-linux-x64-musl@npm:1.2.163" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@swc/core-win32-arm64-msvc@npm:1.2.161": - version: 1.2.161 - resolution: "@swc/core-win32-arm64-msvc@npm:1.2.161" +"@swc/core-win32-arm64-msvc@npm:1.2.163": + version: 1.2.163 + resolution: "@swc/core-win32-arm64-msvc@npm:1.2.163" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@swc/core-win32-ia32-msvc@npm:1.2.161": - version: 1.2.161 - resolution: "@swc/core-win32-ia32-msvc@npm:1.2.161" +"@swc/core-win32-ia32-msvc@npm:1.2.163": + version: 1.2.163 + resolution: "@swc/core-win32-ia32-msvc@npm:1.2.163" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@swc/core-win32-x64-msvc@npm:1.2.161": - version: 1.2.161 - resolution: "@swc/core-win32-x64-msvc@npm:1.2.161" +"@swc/core-win32-x64-msvc@npm:1.2.163": + version: 1.2.163 + resolution: "@swc/core-win32-x64-msvc@npm:1.2.163" conditions: os=win32 & cpu=x64 languageName: node linkType: hard -"@swc/core@npm:1.2.161": - version: 1.2.161 - resolution: "@swc/core@npm:1.2.161" - dependencies: - "@swc/core-android-arm-eabi": 1.2.161 - "@swc/core-android-arm64": 1.2.161 - "@swc/core-darwin-arm64": 1.2.161 - "@swc/core-darwin-x64": 1.2.161 - "@swc/core-freebsd-x64": 1.2.161 - "@swc/core-linux-arm-gnueabihf": 1.2.161 - "@swc/core-linux-arm64-gnu": 1.2.161 - "@swc/core-linux-arm64-musl": 1.2.161 - "@swc/core-linux-x64-gnu": 1.2.161 - "@swc/core-linux-x64-musl": 1.2.161 - "@swc/core-win32-arm64-msvc": 1.2.161 - "@swc/core-win32-ia32-msvc": 1.2.161 - "@swc/core-win32-x64-msvc": 1.2.161 +"@swc/core@npm:1.2.163": + version: 1.2.163 + resolution: "@swc/core@npm:1.2.163" + dependencies: + "@swc/core-android-arm-eabi": 1.2.163 + "@swc/core-android-arm64": 1.2.163 + "@swc/core-darwin-arm64": 1.2.163 + "@swc/core-darwin-x64": 1.2.163 + "@swc/core-freebsd-x64": 1.2.163 + "@swc/core-linux-arm-gnueabihf": 1.2.163 + "@swc/core-linux-arm64-gnu": 1.2.163 + "@swc/core-linux-arm64-musl": 1.2.163 + "@swc/core-linux-x64-gnu": 1.2.163 + "@swc/core-linux-x64-musl": 1.2.163 + "@swc/core-win32-arm64-msvc": 1.2.163 + "@swc/core-win32-ia32-msvc": 1.2.163 + "@swc/core-win32-x64-msvc": 1.2.163 dependenciesMeta: "@swc/core-android-arm-eabi": optional: true @@ -2717,7 +2667,7 @@ __metadata: optional: true bin: swcx: run_swcx.js - checksum: c3d83795ce179abca4f88d814f8204980f74534428a0f2952c78eb990226549ef115f2374920046134c977e9fe817b12bfee41a5b517f0cdc6a6b2cc59bb6a69 + checksum: ca9b0ba946e4efe5905262f3760d6ce529a141acfe3b4a51e56f11af1139d712e6cf878af554f076e01639c70395442f2473821e558952c8a45370085c636c8a languageName: node linkType: hard @@ -4994,14 +4944,19 @@ __metadata: dependencies: "@docusaurus/core": 2.0.0-beta.18 "@docusaurus/module-type-aliases": 2.0.0-beta.18 + "@docusaurus/plugin-content-docs": 2.0.0-beta.18 + "@docusaurus/plugin-content-pages": 2.0.0-beta.18 + "@docusaurus/plugin-debug": 2.0.0-beta.18 "@docusaurus/plugin-pwa": 2.0.0-beta.18 - "@docusaurus/preset-classic": 2.0.0-beta.18 + "@docusaurus/plugin-sitemap": 2.0.0-beta.18 + "@docusaurus/theme-classic": 2.0.0-beta.18 "@docusaurus/theme-common": 2.0.0-beta.18 + "@docusaurus/theme-search-algolia": 2.0.0-beta.18 "@docusaurus/types": 2.0.0-beta.18 "@fec/remark-a11y-emoji": 3.1.0 "@mdx-js/react": 1.6.22 "@swc/cli": 0.1.57 - "@swc/core": 1.2.161 + "@swc/core": 1.2.163 "@tsconfig/docusaurus": 1.0.5 "@types/is-ci": 3.0.0 "@types/node": 17.0.23 @@ -5009,7 +4964,7 @@ __metadata: clsx: 1.1.1 docusaurus-plugin-custom-tags: "workspace:^" is-ci: 3.0.1 - prettier: 2.6.1 + prettier: 2.6.2 prism-react-renderer: 1.3.1 react: 17.0.2 react-dom: 17.0.2 @@ -5025,7 +4980,7 @@ __metadata: dependencies: "@docusaurus/types": 2.0.0-beta.18 "@swc/cli": 0.1.57 - "@swc/core": 1.2.161 + "@swc/core": 1.2.163 "@types/node": 17.0.23 typescript: 4.6.3 languageName: unknown @@ -9055,12 +9010,12 @@ __metadata: languageName: node linkType: hard -"prettier@npm:2.6.1": - version: 2.6.1 - resolution: "prettier@npm:2.6.1" +"prettier@npm:2.6.2": + version: 2.6.2 + resolution: "prettier@npm:2.6.2" bin: prettier: bin-prettier.js - checksum: 78be1f8a3ddfad7c3d8a854b6c8941a3bb1ddfca4225c38d778e0fe1029a55368f71b3bbefff82c689015fbb4d391ec44add957f01308ad2725e01a7c1f37cb6 + checksum: 48d08dde8e9fb1f5bccdd205baa7f192e9fc8bc98f86e1b97d919de804e28c806b0e6cc685e4a88211aa7987fa9668f30baae19580d87ced3ed0f2ec6572106f languageName: node linkType: hard From 584e0a86ace280f030a4ad14700fbeeeb825b741 Mon Sep 17 00:00:00 2001 From: Evan McCarthy Date: Sun, 10 Apr 2022 10:37:34 -0500 Subject: [PATCH 02/14] fix issue from merge --- config/navbar.config.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/config/navbar.config.ts b/config/navbar.config.ts index 4e8b046fb..acd1a0167 100644 --- a/config/navbar.config.ts +++ b/config/navbar.config.ts @@ -2,7 +2,6 @@ import { Navbar } from "@docusaurus/theme-common"; // don't specify style or hideOnScroll here, we want it to be dynamic const navbar: Omit = { - title: "PaperMC Docs", logo: { src: "img/logo-marker-light.svg", srcDark: "img/logo-marker-dark.svg", From 3ef7cd160ca2e338eafc0d51b7392295e2c214ed Mon Sep 17 00:00:00 2001 From: Evan McCarthy Date: Sun, 10 Apr 2022 14:29:54 -0500 Subject: [PATCH 03/14] split dev and admin docs --- config/sidebar.common.ts | 4 +- config/sidebar.paper.ts | 78 ++++++++++---- config/sidebar.velocity.ts | 98 ++++++++++-------- config/sidebar.waterfall.ts | 4 +- docs/paper/admin/README.md | 4 + .../{ => admin}/getting-started/README.md | 4 + .../getting-started/adding-plugins.md | 1 + .../{ => admin}/getting-started/migration.md | 2 +- docs/paper/{ => admin}/how-to/aikars-flags.md | 2 +- docs/paper/{ => admin}/how-to/anti-xray.md | 2 +- .../how-to/assets/anti-xray-nether.png | Bin .../how-to/assets/anti-xray-overworld.png | Bin .../how-to/per-world-configuration.md | 2 +- docs/paper/{ => admin}/how-to/update.md | 2 +- .../reference/paper-global-configuration.md | 2 +- .../paper-per-world-configuration.md | 2 +- docs/paper/dev/README.md | 4 + docs/velocity/README.md | 4 +- docs/velocity/admin/README.md | 4 + .../{ => admin}/getting-started/README.md | 4 + .../{ => admin}/getting-started/faq.md | 2 +- .../{ => admin}/getting-started/forwarding.md | 2 +- .../getting-started/why-velocity.md | 2 +- docs/velocity/{ => admin}/how-to/migration.md | 2 +- docs/velocity/{ => admin}/how-to/security.md | 2 +- docs/velocity/{ => admin}/how-to/tuning.md | 2 +- .../{ => admin}/reference/commands.md | 2 +- .../{ => admin}/reference/comparison.md | 2 +- .../{ => admin}/reference/configuration.md | 2 +- .../{ => admin}/reference/libraries.md | 2 +- .../reference/server-compatibility.md | 2 +- docs/velocity/{developers => dev}/README.md | 0 .../{developers => dev}/api/command.md | 2 +- .../velocity/{developers => dev}/api/event.md | 2 +- .../{developers => dev}/api/scheduler.md | 2 +- .../getting-started/api-basics.md | 2 +- .../creating-your-first-plugin.md | 2 +- .../getting-started/pitfalls.md | 2 +- .../how-to/dependencies.md | 2 +- .../how-to/porting-from-velocity-1.md | 2 +- 40 files changed, 164 insertions(+), 97 deletions(-) create mode 100644 docs/paper/admin/README.md rename docs/paper/{ => admin}/getting-started/README.md (98%) rename docs/paper/{ => admin}/getting-started/adding-plugins.md (99%) rename docs/paper/{ => admin}/getting-started/migration.md (99%) rename docs/paper/{ => admin}/how-to/aikars-flags.md (99%) rename docs/paper/{ => admin}/how-to/anti-xray.md (99%) rename docs/paper/{ => admin}/how-to/assets/anti-xray-nether.png (100%) rename docs/paper/{ => admin}/how-to/assets/anti-xray-overworld.png (100%) rename docs/paper/{ => admin}/how-to/per-world-configuration.md (99%) rename docs/paper/{ => admin}/how-to/update.md (99%) rename docs/paper/{ => admin}/reference/paper-global-configuration.md (99%) rename docs/paper/{ => admin}/reference/paper-per-world-configuration.md (99%) create mode 100644 docs/paper/dev/README.md create mode 100644 docs/velocity/admin/README.md rename docs/velocity/{ => admin}/getting-started/README.md (99%) rename docs/velocity/{ => admin}/getting-started/faq.md (99%) rename docs/velocity/{ => admin}/getting-started/forwarding.md (99%) rename docs/velocity/{ => admin}/getting-started/why-velocity.md (99%) rename docs/velocity/{ => admin}/how-to/migration.md (95%) rename docs/velocity/{ => admin}/how-to/security.md (99%) rename docs/velocity/{ => admin}/how-to/tuning.md (99%) rename docs/velocity/{ => admin}/reference/commands.md (98%) rename docs/velocity/{ => admin}/reference/comparison.md (99%) rename docs/velocity/{ => admin}/reference/configuration.md (99%) rename docs/velocity/{ => admin}/reference/libraries.md (99%) rename docs/velocity/{ => admin}/reference/server-compatibility.md (99%) rename docs/velocity/{developers => dev}/README.md (100%) rename docs/velocity/{developers => dev}/api/command.md (99%) rename docs/velocity/{developers => dev}/api/event.md (99%) rename docs/velocity/{developers => dev}/api/scheduler.md (98%) rename docs/velocity/{developers => dev}/getting-started/api-basics.md (99%) rename docs/velocity/{developers => dev}/getting-started/creating-your-first-plugin.md (98%) rename docs/velocity/{developers => dev}/getting-started/pitfalls.md (97%) rename docs/velocity/{developers => dev}/how-to/dependencies.md (97%) rename docs/velocity/{developers => dev}/how-to/porting-from-velocity-1.md (96%) diff --git a/config/sidebar.common.ts b/config/sidebar.common.ts index 949c2076f..8277ab3d6 100644 --- a/config/sidebar.common.ts +++ b/config/sidebar.common.ts @@ -1,8 +1,8 @@ import type { SidebarsConfig } from "@docusaurus/plugin-content-docs"; import { sidebar } from "./common"; -const sidebars: SidebarsConfig = { +const common: SidebarsConfig = { primary: [...sidebar, "common", "java-install", "downloads-api", "assets", "contact"], }; -export = sidebars; +export = common; diff --git a/config/sidebar.paper.ts b/config/sidebar.paper.ts index b09cfcba5..b5be709ea 100644 --- a/config/sidebar.paper.ts +++ b/config/sidebar.paper.ts @@ -1,47 +1,79 @@ import type { SidebarsConfig } from "@docusaurus/plugin-content-docs"; import { sidebar } from "./common"; -const sidebars: SidebarsConfig = { +const paper: SidebarsConfig = { primary: [ ...sidebar, "README", { type: "category", - label: "Getting Started", + label: "Server Administrators", + collapsed: true, link: { type: "doc", - id: "getting-started/README", + id: "admin/README", }, items: [ - { type: "ref", id: "getting-started/README" }, - "getting-started/adding-plugins", - "getting-started/migration", + { + type: "category", + label: "Getting Started", + link: { + type: "doc", + id: "admin/getting-started/README", + }, + items: [ + { + type: "ref", + id: "admin/getting-started/README", + }, + "admin/getting-started/adding-plugins", + "admin/getting-started/migration", + ], + }, + { + type: "category", + label: "How-to Guides", + link: { + type: "generated-index", + slug: "/cat/admin/how-to-guides", + }, + items: [ + "admin/how-to/per-world-configuration", + "admin/how-to/update", + "admin/how-to/aikars-flags", + "admin/how-to/anti-xray", + ], + }, + { + type: "category", + label: "Reference", + link: { + type: "generated-index", + slug: "/cat/admin/reference", + }, + items: [ + "admin/reference/paper-global-configuration", + "admin/reference/paper-per-world-configuration", + ], + }, ], }, { type: "category", - label: "How-to Guides", + label: "Developer's Guide", + collapsed: true, link: { - type: "generated-index", - slug: "/category/paper/how-to-guides", + type: "doc", + id: "dev/README", }, items: [ - "how-to/per-world-configuration", - "how-to/update", - "how-to/aikars-flags", - "how-to/anti-xray", + { + type: "ref", + id: "dev/README", + }, ], }, - { - type: "category", - label: "Reference", - link: { - type: "generated-index", - slug: "/category/paper/reference", - }, - items: ["reference/paper-global-configuration", "reference/paper-per-world-configuration"], - }, ], }; -export = sidebars; +export = paper; diff --git a/config/sidebar.velocity.ts b/config/sidebar.velocity.ts index 9eca90ab6..31cb5edee 100644 --- a/config/sidebar.velocity.ts +++ b/config/sidebar.velocity.ts @@ -1,68 +1,82 @@ import type { SidebarsConfig } from "@docusaurus/plugin-content-docs"; import { sidebar } from "./common"; -const sidebars: SidebarsConfig = { +const velocity: SidebarsConfig = { primary: [ ...sidebar, "README", { type: "category", - label: "Getting Started", + label: "Server Administrators", + collapsed: true, link: { type: "doc", - id: "getting-started/README", + id: "admin/README", }, items: [ - { type: "ref", id: "getting-started/README" }, - "getting-started/why-velocity", - "getting-started/forwarding", - "getting-started/faq", - ], - }, - { - type: "category", - label: "How-to Guides", - link: { - type: "generated-index", - slug: "/category/velocity/how-to-guides", - }, - items: ["how-to/security", "how-to/tuning", "how-to/migration"], - }, - { - type: "category", - label: "Reference", - link: { - type: "generated-index", - slug: "/category/velocity/reference", - }, - items: [ - "reference/configuration", - "reference/commands", - "reference/server-compatibility", - "reference/comparison", - "reference/libraries", + { + type: "category", + label: "Getting Started", + link: { + type: "doc", + id: "admin/getting-started/README", + }, + items: [ + { + type: "ref", + id: "admin/getting-started/README", + }, + "admin/getting-started/why-velocity", + "admin/getting-started/forwarding", + "admin/getting-started/faq", + ], + }, + { + type: "category", + label: "How-to Guides", + link: { + type: "generated-index", + slug: "/cat/admin/how-to-guides", + }, + items: ["admin/how-to/security", "admin/how-to/tuning", "admin/how-to/migration"], + }, + { + type: "category", + label: "Reference", + link: { + type: "generated-index", + slug: "/cat/admin/reference", + }, + items: [ + "admin/reference/configuration", + "admin/reference/commands", + "admin/reference/server-compatibility", + "admin/reference/comparison", + "admin/reference/libraries", + ], + }, ], }, { type: "category", label: "Developers", + collapsed: true, link: { type: "doc", - id: "developers/README", + id: "dev/README", }, items: [ - { type: "ref", id: "developers/README" }, { type: "category", label: "Getting Started", link: { type: "generated-index", - slug: "/category/velocity/developers/getting-started", + slug: "/cat/dev/getting-started", }, items: [ - "developers/getting-started/creating-your-first-plugin", - "developers/getting-started/api-basics", - "developers/getting-started/pitfalls", + "dev/getting-started/creating-your-first-plugin", + "dev/getting-started/api-basics", + "dev/getting-started/pitfalls", ], }, { @@ -70,22 +84,22 @@ const sidebars: SidebarsConfig = { label: "How-to Guides", link: { type: "generated-index", - slug: "/category/velocity/developers/how-to-guides", + slug: "/cat/dev/how-to-guides", }, - items: ["developers/how-to/dependencies", "developers/how-to/porting-from-velocity-1"], + items: ["dev/how-to/dependencies", "dev/how-to/porting-from-velocity-1"], }, { type: "category", label: "API", link: { type: "generated-index", - slug: "/category/velocity/developers/api", + slug: "/cat/dev/api", }, - items: ["developers/api/event", "developers/api/command", "developers/api/scheduler"], + items: ["dev/api/event", "dev/api/command", "dev/api/scheduler"], }, ], }, ], }; -export = sidebars; +export = velocity; diff --git a/config/sidebar.waterfall.ts b/config/sidebar.waterfall.ts index 9a9765048..0598365c6 100644 --- a/config/sidebar.waterfall.ts +++ b/config/sidebar.waterfall.ts @@ -1,8 +1,8 @@ import type { SidebarsConfig } from "@docusaurus/plugin-content-docs"; import { sidebar } from "./common"; -const sidebars: SidebarsConfig = { +const waterfall: SidebarsConfig = { primary: [...sidebar, "README", "getting-started", "configuration"], }; -export = sidebars; +export = waterfall; diff --git a/docs/paper/admin/README.md b/docs/paper/admin/README.md new file mode 100644 index 000000000..2aa308967 --- /dev/null +++ b/docs/paper/admin/README.md @@ -0,0 +1,4 @@ +# Paper Server Administration + +Welcome to the Paper Server Administration Guide! This guide includes information and tutorials +regarding the administration of a Paper server. diff --git a/docs/paper/getting-started/README.md b/docs/paper/admin/getting-started/README.md similarity index 98% rename from docs/paper/getting-started/README.md rename to docs/paper/admin/getting-started/README.md index cb0254411..3ff5edebe 100644 --- a/docs/paper/getting-started/README.md +++ b/docs/paper/admin/getting-started/README.md @@ -1,3 +1,7 @@ +--- +slug: /getting-started +--- + # Getting Started ## Requirements diff --git a/docs/paper/getting-started/adding-plugins.md b/docs/paper/admin/getting-started/adding-plugins.md similarity index 99% rename from docs/paper/getting-started/adding-plugins.md rename to docs/paper/admin/getting-started/adding-plugins.md index c41e84fb8..0afccac9c 100644 --- a/docs/paper/getting-started/adding-plugins.md +++ b/docs/paper/admin/getting-started/adding-plugins.md @@ -1,5 +1,6 @@ --- toc_max_heading_level: 4 +slug: /adding-plugins --- # Adding Plugins diff --git a/docs/paper/getting-started/migration.md b/docs/paper/admin/getting-started/migration.md similarity index 99% rename from docs/paper/getting-started/migration.md rename to docs/paper/admin/getting-started/migration.md index af034ae87..0ad3e4c49 100644 --- a/docs/paper/getting-started/migration.md +++ b/docs/paper/admin/getting-started/migration.md @@ -1,5 +1,5 @@ --- -slug: /paper/migration +slug: /migration title: Migrating to or from Paper --- diff --git a/docs/paper/how-to/aikars-flags.md b/docs/paper/admin/how-to/aikars-flags.md similarity index 99% rename from docs/paper/how-to/aikars-flags.md rename to docs/paper/admin/how-to/aikars-flags.md index eeb993766..52ca320e8 100644 --- a/docs/paper/how-to/aikars-flags.md +++ b/docs/paper/admin/how-to/aikars-flags.md @@ -1,5 +1,5 @@ --- -slug: /paper/aikars-flags +slug: /aikars-flags --- # Aikar's Flags diff --git a/docs/paper/how-to/anti-xray.md b/docs/paper/admin/how-to/anti-xray.md similarity index 99% rename from docs/paper/how-to/anti-xray.md rename to docs/paper/admin/how-to/anti-xray.md index 5f2f49e73..95410a5e9 100644 --- a/docs/paper/how-to/anti-xray.md +++ b/docs/paper/admin/how-to/anti-xray.md @@ -1,5 +1,5 @@ --- -slug: /paper/anti-xray +slug: /anti-xray --- # Configuring Anti-Xray diff --git a/docs/paper/how-to/assets/anti-xray-nether.png b/docs/paper/admin/how-to/assets/anti-xray-nether.png similarity index 100% rename from docs/paper/how-to/assets/anti-xray-nether.png rename to docs/paper/admin/how-to/assets/anti-xray-nether.png diff --git a/docs/paper/how-to/assets/anti-xray-overworld.png b/docs/paper/admin/how-to/assets/anti-xray-overworld.png similarity index 100% rename from docs/paper/how-to/assets/anti-xray-overworld.png rename to docs/paper/admin/how-to/assets/anti-xray-overworld.png diff --git a/docs/paper/how-to/per-world-configuration.md b/docs/paper/admin/how-to/per-world-configuration.md similarity index 99% rename from docs/paper/how-to/per-world-configuration.md rename to docs/paper/admin/how-to/per-world-configuration.md index 16b3976bd..a5d756d0c 100644 --- a/docs/paper/how-to/per-world-configuration.md +++ b/docs/paper/admin/how-to/per-world-configuration.md @@ -1,5 +1,5 @@ --- -slug: /paper/per-world-configuration +slug: /per-world-configuration --- # Per World Configuration diff --git a/docs/paper/how-to/update.md b/docs/paper/admin/how-to/update.md similarity index 99% rename from docs/paper/how-to/update.md rename to docs/paper/admin/how-to/update.md index 2927e916b..eadb3f3a8 100644 --- a/docs/paper/how-to/update.md +++ b/docs/paper/admin/how-to/update.md @@ -1,5 +1,5 @@ --- -slug: /paper/updating +slug: /updating --- # Updating Paper diff --git a/docs/paper/reference/paper-global-configuration.md b/docs/paper/admin/reference/paper-global-configuration.md similarity index 99% rename from docs/paper/reference/paper-global-configuration.md rename to docs/paper/admin/reference/paper-global-configuration.md index 74fc642ce..5e2d252cf 100644 --- a/docs/paper/reference/paper-global-configuration.md +++ b/docs/paper/admin/reference/paper-global-configuration.md @@ -1,5 +1,5 @@ --- -slug: /paper/reference/paper-global-configuration +slug: /reference/paper-global-configuration keywords: - paper.yml - paper.yml settings diff --git a/docs/paper/reference/paper-per-world-configuration.md b/docs/paper/admin/reference/paper-per-world-configuration.md similarity index 99% rename from docs/paper/reference/paper-per-world-configuration.md rename to docs/paper/admin/reference/paper-per-world-configuration.md index 138afb346..be733389b 100644 --- a/docs/paper/reference/paper-per-world-configuration.md +++ b/docs/paper/admin/reference/paper-per-world-configuration.md @@ -1,5 +1,5 @@ --- -slug: /paper/reference/paper-per-world-configuration +slug: /reference/paper-per-world-configuration keywords: - paper.yml - paper.yml world-settings diff --git a/docs/paper/dev/README.md b/docs/paper/dev/README.md new file mode 100644 index 000000000..fb0b4697c --- /dev/null +++ b/docs/paper/dev/README.md @@ -0,0 +1,4 @@ +# Paper Developer's Guide + +Welcome to the Paper Developer's Guide! This guide includes information and tutorials for developers +to create and expand on Paper plugins. diff --git a/docs/velocity/README.md b/docs/velocity/README.md index 0d7625fe8..7d365e3ef 100644 --- a/docs/velocity/README.md +++ b/docs/velocity/README.md @@ -5,7 +5,7 @@ Velocity is the ridiculously scalable, flexible Minecraft proxy. ## Getting started It is simple to get started with Velocity. Get started with our -[Getting Started guide](getting-started/README.md). +[Getting Started guide](admin/getting-started/README.md). ## I need help @@ -17,7 +17,7 @@ We have put a lot of effort into documenting Velocity as much as possible with o our coverage will continue to expand. We strongly encourage you to check the sidebar of the wiki for relevant resources. Helping yourself using the resources in this wiki saves all of us time. -We recommend you visit the [frequently-asked questions](getting-started/faq.md) to begin your +We recommend you visit the [frequently-asked questions](admin/getting-started/faq.md) to begin your search. Most common issues with Velocity are answered there. Please do not be offended if we respond to your question linking back here. Asking us a question diff --git a/docs/velocity/admin/README.md b/docs/velocity/admin/README.md new file mode 100644 index 000000000..3c559f28a --- /dev/null +++ b/docs/velocity/admin/README.md @@ -0,0 +1,4 @@ +# Velocity Proxy Administration + +Welcome to the Velocity Proxy Administration Guide! This guide includes information and tutorials +regarding the administration of a Velocity proxy. diff --git a/docs/velocity/getting-started/README.md b/docs/velocity/admin/getting-started/README.md similarity index 99% rename from docs/velocity/getting-started/README.md rename to docs/velocity/admin/getting-started/README.md index 23c588a72..13b4d2d3c 100644 --- a/docs/velocity/getting-started/README.md +++ b/docs/velocity/admin/getting-started/README.md @@ -1,3 +1,7 @@ +--- +slug: /getting-started +--- + # Getting Started This page covers how to install and set up a minimal configuration of Velocity. diff --git a/docs/velocity/getting-started/faq.md b/docs/velocity/admin/getting-started/faq.md similarity index 99% rename from docs/velocity/getting-started/faq.md rename to docs/velocity/admin/getting-started/faq.md index 3205d6ace..9c9233f6f 100644 --- a/docs/velocity/getting-started/faq.md +++ b/docs/velocity/admin/getting-started/faq.md @@ -1,5 +1,5 @@ --- -slug: /velocity/faq +slug: /faq --- # Frequently Asked Questions diff --git a/docs/velocity/getting-started/forwarding.md b/docs/velocity/admin/getting-started/forwarding.md similarity index 99% rename from docs/velocity/getting-started/forwarding.md rename to docs/velocity/admin/getting-started/forwarding.md index 73370e6fc..34bef840e 100644 --- a/docs/velocity/getting-started/forwarding.md +++ b/docs/velocity/admin/getting-started/forwarding.md @@ -1,5 +1,5 @@ --- -slug: /velocity/player-information-forwarding +slug: /player-information-forwarding --- # Configuring player information forwarding diff --git a/docs/velocity/getting-started/why-velocity.md b/docs/velocity/admin/getting-started/why-velocity.md similarity index 99% rename from docs/velocity/getting-started/why-velocity.md rename to docs/velocity/admin/getting-started/why-velocity.md index cfc4b35cb..e2e241ef3 100644 --- a/docs/velocity/getting-started/why-velocity.md +++ b/docs/velocity/admin/getting-started/why-velocity.md @@ -1,5 +1,5 @@ --- -slug: /velocity/why-velocity +slug: /why-velocity --- # What Does Velocity Do For Me? diff --git a/docs/velocity/how-to/migration.md b/docs/velocity/admin/how-to/migration.md similarity index 95% rename from docs/velocity/how-to/migration.md rename to docs/velocity/admin/how-to/migration.md index d983d5e0a..e757f9ab4 100644 --- a/docs/velocity/how-to/migration.md +++ b/docs/velocity/admin/how-to/migration.md @@ -1,5 +1,5 @@ --- -slug: /velocity/migration +slug: /migration --- # Migration Guide diff --git a/docs/velocity/how-to/security.md b/docs/velocity/admin/how-to/security.md similarity index 99% rename from docs/velocity/how-to/security.md rename to docs/velocity/admin/how-to/security.md index beceff2e5..c8b53ac4e 100644 --- a/docs/velocity/how-to/security.md +++ b/docs/velocity/admin/how-to/security.md @@ -1,5 +1,5 @@ --- -slug: /velocity/security +slug: /security --- # Securing Your Servers diff --git a/docs/velocity/how-to/tuning.md b/docs/velocity/admin/how-to/tuning.md similarity index 99% rename from docs/velocity/how-to/tuning.md rename to docs/velocity/admin/how-to/tuning.md index a84e6640b..c9aba5b93 100644 --- a/docs/velocity/how-to/tuning.md +++ b/docs/velocity/admin/how-to/tuning.md @@ -1,5 +1,5 @@ --- -slug: /velocity/tuning +slug: /tuning --- # Tuning Velocity diff --git a/docs/velocity/reference/commands.md b/docs/velocity/admin/reference/commands.md similarity index 98% rename from docs/velocity/reference/commands.md rename to docs/velocity/admin/reference/commands.md index cc65391f2..fefe5c9c0 100644 --- a/docs/velocity/reference/commands.md +++ b/docs/velocity/admin/reference/commands.md @@ -1,5 +1,5 @@ --- -slug: /velocity/built-in-commands +slug: /built-in-commands --- # Built-In Commands diff --git a/docs/velocity/reference/comparison.md b/docs/velocity/admin/reference/comparison.md similarity index 99% rename from docs/velocity/reference/comparison.md rename to docs/velocity/admin/reference/comparison.md index be31578f3..7870f6abc 100644 --- a/docs/velocity/reference/comparison.md +++ b/docs/velocity/admin/reference/comparison.md @@ -1,5 +1,5 @@ --- -slug: /velocity/comparisons-to-other-proxies +slug: /comparisons-to-other-proxies --- # Comparing With Other Proxies diff --git a/docs/velocity/reference/configuration.md b/docs/velocity/admin/reference/configuration.md similarity index 99% rename from docs/velocity/reference/configuration.md rename to docs/velocity/admin/reference/configuration.md index 9f202386c..7e517d25e 100644 --- a/docs/velocity/reference/configuration.md +++ b/docs/velocity/admin/reference/configuration.md @@ -1,5 +1,5 @@ --- -slug: /velocity/configuration +slug: /configuration --- # Configuring Velocity diff --git a/docs/velocity/reference/libraries.md b/docs/velocity/admin/reference/libraries.md similarity index 99% rename from docs/velocity/reference/libraries.md rename to docs/velocity/admin/reference/libraries.md index 32dffcd06..d90d866ff 100644 --- a/docs/velocity/reference/libraries.md +++ b/docs/velocity/admin/reference/libraries.md @@ -1,5 +1,5 @@ --- -slug: /velocity/credits +slug: /credits --- # Libraries Used diff --git a/docs/velocity/reference/server-compatibility.md b/docs/velocity/admin/reference/server-compatibility.md similarity index 99% rename from docs/velocity/reference/server-compatibility.md rename to docs/velocity/admin/reference/server-compatibility.md index 9ccb1d4bf..a95b21a18 100644 --- a/docs/velocity/reference/server-compatibility.md +++ b/docs/velocity/admin/reference/server-compatibility.md @@ -1,5 +1,5 @@ --- -slug: /velocity/server-compatibility +slug: /server-compatibility --- # Server Compatibility diff --git a/docs/velocity/developers/README.md b/docs/velocity/dev/README.md similarity index 100% rename from docs/velocity/developers/README.md rename to docs/velocity/dev/README.md diff --git a/docs/velocity/developers/api/command.md b/docs/velocity/dev/api/command.md similarity index 99% rename from docs/velocity/developers/api/command.md rename to docs/velocity/dev/api/command.md index f36042bdb..eac72b886 100644 --- a/docs/velocity/developers/api/command.md +++ b/docs/velocity/dev/api/command.md @@ -1,5 +1,5 @@ --- -slug: /velocity/developers/command-api +slug: /dev/command-api --- # The Command API diff --git a/docs/velocity/developers/api/event.md b/docs/velocity/dev/api/event.md similarity index 99% rename from docs/velocity/developers/api/event.md rename to docs/velocity/dev/api/event.md index a8948a6fb..5150e871f 100644 --- a/docs/velocity/developers/api/event.md +++ b/docs/velocity/dev/api/event.md @@ -1,5 +1,5 @@ --- -slug: /velocity/developers/event-api +slug: /dev/event-api --- # Working With Events diff --git a/docs/velocity/developers/api/scheduler.md b/docs/velocity/dev/api/scheduler.md similarity index 98% rename from docs/velocity/developers/api/scheduler.md rename to docs/velocity/dev/api/scheduler.md index 54c86f5dc..9f13c48a7 100644 --- a/docs/velocity/developers/api/scheduler.md +++ b/docs/velocity/dev/api/scheduler.md @@ -1,5 +1,5 @@ --- -slug: /velocity/developers/scheduler-api +slug: /dev/scheduler-api --- # Using the Scheduler diff --git a/docs/velocity/developers/getting-started/api-basics.md b/docs/velocity/dev/getting-started/api-basics.md similarity index 99% rename from docs/velocity/developers/getting-started/api-basics.md rename to docs/velocity/dev/getting-started/api-basics.md index 510a0937a..441c99cd8 100644 --- a/docs/velocity/developers/getting-started/api-basics.md +++ b/docs/velocity/dev/getting-started/api-basics.md @@ -1,5 +1,5 @@ --- -slug: /velocity/developers/api-basics +slug: /dev/api-basics --- # Velocity Plugin Basics diff --git a/docs/velocity/developers/getting-started/creating-your-first-plugin.md b/docs/velocity/dev/getting-started/creating-your-first-plugin.md similarity index 98% rename from docs/velocity/developers/getting-started/creating-your-first-plugin.md rename to docs/velocity/dev/getting-started/creating-your-first-plugin.md index 470f78d0d..97b627a75 100644 --- a/docs/velocity/developers/getting-started/creating-your-first-plugin.md +++ b/docs/velocity/dev/getting-started/creating-your-first-plugin.md @@ -1,5 +1,5 @@ --- -slug: /velocity/developers/creating-your-first-plugin +slug: /dev/creating-your-first-plugin --- # Creating Your First Plugin diff --git a/docs/velocity/developers/getting-started/pitfalls.md b/docs/velocity/dev/getting-started/pitfalls.md similarity index 97% rename from docs/velocity/developers/getting-started/pitfalls.md rename to docs/velocity/dev/getting-started/pitfalls.md index 3e65e82c8..f075b7954 100644 --- a/docs/velocity/developers/getting-started/pitfalls.md +++ b/docs/velocity/dev/getting-started/pitfalls.md @@ -1,5 +1,5 @@ --- -slug: /velocity/developers/pitfalls +slug: /dev/pitfalls --- # Common Pitfalls diff --git a/docs/velocity/developers/how-to/dependencies.md b/docs/velocity/dev/how-to/dependencies.md similarity index 97% rename from docs/velocity/developers/how-to/dependencies.md rename to docs/velocity/dev/how-to/dependencies.md index 2726858b1..283fe7f41 100644 --- a/docs/velocity/developers/how-to/dependencies.md +++ b/docs/velocity/dev/how-to/dependencies.md @@ -1,5 +1,5 @@ --- -slug: /velocity/developers/dependency-management +slug: /dev/dependency-management --- # Dependency Management diff --git a/docs/velocity/developers/how-to/porting-from-velocity-1.md b/docs/velocity/dev/how-to/porting-from-velocity-1.md similarity index 96% rename from docs/velocity/developers/how-to/porting-from-velocity-1.md rename to docs/velocity/dev/how-to/porting-from-velocity-1.md index 5752e7227..fc707c728 100644 --- a/docs/velocity/developers/how-to/porting-from-velocity-1.md +++ b/docs/velocity/dev/how-to/porting-from-velocity-1.md @@ -1,5 +1,5 @@ --- -slug: /velocity/developers/porting-plugins-from-velocity-1 +slug: /dev/porting-plugins-from-velocity-1 --- # Porting Your Plugin from Velocity 1.x.x From 734630f6923a1c906f465900c367f280665f9e3d Mon Sep 17 00:00:00 2001 From: Evan McCarthy Date: Sun, 10 Apr 2022 14:43:55 -0500 Subject: [PATCH 04/14] remove getting help sidebar links --- config/common.ts | 21 --------------------- config/sidebar.common.ts | 3 +-- config/sidebar.paper.ts | 2 -- config/sidebar.velocity.ts | 2 -- config/sidebar.waterfall.ts | 3 +-- 5 files changed, 2 insertions(+), 29 deletions(-) delete mode 100644 config/common.ts diff --git a/config/common.ts b/config/common.ts deleted file mode 100644 index 333366e06..000000000 --- a/config/common.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { SidebarItemConfig } from "@docusaurus/plugin-content-docs/lib/sidebars/types"; - -export const sidebar: SidebarItemConfig[] = [ - { - type: "category", - collapsed: true, - label: "Getting Help", - items: [ - { - type: "link", - label: "Discord", - href: "https://discord.gg/papermc", - }, - { - type: "link", - label: "Forums", - href: "https://forums.papermc.io", - }, - ], - }, -]; diff --git a/config/sidebar.common.ts b/config/sidebar.common.ts index 8277ab3d6..dcb291e2b 100644 --- a/config/sidebar.common.ts +++ b/config/sidebar.common.ts @@ -1,8 +1,7 @@ import type { SidebarsConfig } from "@docusaurus/plugin-content-docs"; -import { sidebar } from "./common"; const common: SidebarsConfig = { - primary: [...sidebar, "common", "java-install", "downloads-api", "assets", "contact"], + primary: ["common", "java-install", "downloads-api", "assets", "contact"], }; export = common; diff --git a/config/sidebar.paper.ts b/config/sidebar.paper.ts index b5be709ea..9f011076c 100644 --- a/config/sidebar.paper.ts +++ b/config/sidebar.paper.ts @@ -1,9 +1,7 @@ import type { SidebarsConfig } from "@docusaurus/plugin-content-docs"; -import { sidebar } from "./common"; const paper: SidebarsConfig = { primary: [ - ...sidebar, "README", { type: "category", diff --git a/config/sidebar.velocity.ts b/config/sidebar.velocity.ts index 31cb5edee..65334ef0e 100644 --- a/config/sidebar.velocity.ts +++ b/config/sidebar.velocity.ts @@ -1,9 +1,7 @@ import type { SidebarsConfig } from "@docusaurus/plugin-content-docs"; -import { sidebar } from "./common"; const velocity: SidebarsConfig = { primary: [ - ...sidebar, "README", { type: "category", diff --git a/config/sidebar.waterfall.ts b/config/sidebar.waterfall.ts index 0598365c6..9f3daffa8 100644 --- a/config/sidebar.waterfall.ts +++ b/config/sidebar.waterfall.ts @@ -1,8 +1,7 @@ import type { SidebarsConfig } from "@docusaurus/plugin-content-docs"; -import { sidebar } from "./common"; const waterfall: SidebarsConfig = { - primary: [...sidebar, "README", "getting-started", "configuration"], + primary: ["README", "getting-started", "configuration"], }; export = waterfall; From 845fc367fb7e3ee208aa417c7e976f2449b50b1a Mon Sep 17 00:00:00 2001 From: Evan McCarthy Date: Sun, 10 Apr 2022 14:55:29 -0500 Subject: [PATCH 05/14] wiki -> docs --- docs/paper/README.md | 2 +- docs/velocity/README.md | 10 +++++----- docs/velocity/admin/getting-started/README.md | 4 ++-- docs/waterfall/README.md | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/paper/README.md b/docs/paper/README.md index 222ef1951..695105c6c 100644 --- a/docs/paper/README.md +++ b/docs/paper/README.md @@ -1,4 +1,4 @@ -# Welcome to the Paper Wiki +# Welcome to the Paper Docs Paper is a high performance fork of the Spigot Minecraft Server that aims to fix gameplay and mechanics inconsistencies as well as to improve performance. Paper contains numerous features, bug diff --git a/docs/velocity/README.md b/docs/velocity/README.md index 7d365e3ef..7ad428944 100644 --- a/docs/velocity/README.md +++ b/docs/velocity/README.md @@ -1,4 +1,4 @@ -# Welcome to the Velocity Wiki +# Welcome to the Velocity Docs Velocity is the ridiculously scalable, flexible Minecraft proxy. @@ -11,11 +11,11 @@ It is simple to get started with Velocity. Get started with our If you need some help with Velocity, please seek help in the following places: -### 📖 This Wiki +### 📖 These Docs We have put a lot of effort into documenting Velocity as much as possible with our new website and -our coverage will continue to expand. We strongly encourage you to check the sidebar of the wiki for -relevant resources. Helping yourself using the resources in this wiki saves all of us time. +our coverage will continue to expand. We strongly encourage you to check the sidebar of the docs for +relevant resources. Helping yourself using the resources in these docs saves all of us time. We recommend you visit the [frequently-asked questions](admin/getting-started/faq.md) to begin your search. Most common issues with Velocity are answered there. @@ -25,5 +25,5 @@ already answered in the documentation doesn't help anyone. ### 💬 Our Discord -If you have searched the wiki and didn't find the answer to your question, then it is time to +If you have searched the docs and didn't find the answer to your question, then it is time to [join our Discord](https://discord.gg/papermc) to ask your question. diff --git a/docs/velocity/admin/getting-started/README.md b/docs/velocity/admin/getting-started/README.md index 13b4d2d3c..1b59a8133 100644 --- a/docs/velocity/admin/getting-started/README.md +++ b/docs/velocity/admin/getting-started/README.md @@ -94,8 +94,8 @@ We now need to configure each server to accept connections from the proxy. Velocity is a highly configurable proxy. While most users will not need to change everything in the config, there are tons of options covered -[on the configuration wiki page](../reference/configuration.md) along with an explanation on how -each option works. However, in this section we will do the bare minimum to get the proxy up and +[on the configuration reference page](../reference/configuration.md) along with an explanation on +how each option works. However, in this section we will do the bare minimum to get the proxy up and running. Open the `velocity.toml` file in a text editor and search for the `[servers]` section. This section diff --git a/docs/waterfall/README.md b/docs/waterfall/README.md index dd9dd065f..675910d62 100644 --- a/docs/waterfall/README.md +++ b/docs/waterfall/README.md @@ -1,4 +1,4 @@ -# Welcome to the Waterfall Wiki +# Welcome to the Waterfall Docs Waterfall is the BungeeCord fork that aims to improve performance and stability. From a58796658eeeb927e89fdd213a240aecc29c11d8 Mon Sep 17 00:00:00 2001 From: Evan McCarthy Date: Sun, 10 Apr 2022 15:35:01 -0500 Subject: [PATCH 06/14] common -> misc --- config/navbar.config.ts | 4 ++-- config/sidebar.common.ts | 7 ------- config/sidebar.misc.ts | 7 +++++++ docs/common/common.md | 3 --- docs/{common => misc}/assets.md | 0 docs/{common => misc}/contact.md | 0 docs/{common => misc}/downloads-api.md | 0 docs/{common => misc}/java-install.md | 0 docs/misc/misc.md | 3 +++ docs/{common => misc}/papermc-logomark-500.png | Bin docs/{common => misc}/pterodactyl-manual.png | Bin docs/{common => misc}/pterodactyl-prompt.png | Bin docusaurus.config.ts | 6 +++--- src/components/Projects.tsx | 6 +++--- 14 files changed, 18 insertions(+), 18 deletions(-) delete mode 100644 config/sidebar.common.ts create mode 100644 config/sidebar.misc.ts delete mode 100644 docs/common/common.md rename docs/{common => misc}/assets.md (100%) rename docs/{common => misc}/contact.md (100%) rename docs/{common => misc}/downloads-api.md (100%) rename docs/{common => misc}/java-install.md (100%) create mode 100644 docs/misc/misc.md rename docs/{common => misc}/papermc-logomark-500.png (100%) rename docs/{common => misc}/pterodactyl-manual.png (100%) rename docs/{common => misc}/pterodactyl-prompt.png (100%) diff --git a/config/navbar.config.ts b/config/navbar.config.ts index acd1a0167..a7a7dd98c 100644 --- a/config/navbar.config.ts +++ b/config/navbar.config.ts @@ -26,8 +26,8 @@ const navbar: Omit = { position: "left", }, { - to: "common", - label: "Common", + to: "misc", + label: "Misc", position: "left", }, { diff --git a/config/sidebar.common.ts b/config/sidebar.common.ts deleted file mode 100644 index dcb291e2b..000000000 --- a/config/sidebar.common.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { SidebarsConfig } from "@docusaurus/plugin-content-docs"; - -const common: SidebarsConfig = { - primary: ["common", "java-install", "downloads-api", "assets", "contact"], -}; - -export = common; diff --git a/config/sidebar.misc.ts b/config/sidebar.misc.ts new file mode 100644 index 000000000..197c36aa5 --- /dev/null +++ b/config/sidebar.misc.ts @@ -0,0 +1,7 @@ +import type { SidebarsConfig } from "@docusaurus/plugin-content-docs"; + +const misc: SidebarsConfig = { + primary: ["misc", "java-install", "downloads-api", "assets", "contact"], +}; + +export = misc; diff --git a/docs/common/common.md b/docs/common/common.md deleted file mode 100644 index 4d6643001..000000000 --- a/docs/common/common.md +++ /dev/null @@ -1,3 +0,0 @@ -# Common - -Documentation relevant to all of PaperMC. diff --git a/docs/common/assets.md b/docs/misc/assets.md similarity index 100% rename from docs/common/assets.md rename to docs/misc/assets.md diff --git a/docs/common/contact.md b/docs/misc/contact.md similarity index 100% rename from docs/common/contact.md rename to docs/misc/contact.md diff --git a/docs/common/downloads-api.md b/docs/misc/downloads-api.md similarity index 100% rename from docs/common/downloads-api.md rename to docs/misc/downloads-api.md diff --git a/docs/common/java-install.md b/docs/misc/java-install.md similarity index 100% rename from docs/common/java-install.md rename to docs/misc/java-install.md diff --git a/docs/misc/misc.md b/docs/misc/misc.md new file mode 100644 index 000000000..f9d9ec182 --- /dev/null +++ b/docs/misc/misc.md @@ -0,0 +1,3 @@ +# Misc + +Documentation that does not cleanly fit in any other category. diff --git a/docs/common/papermc-logomark-500.png b/docs/misc/papermc-logomark-500.png similarity index 100% rename from docs/common/papermc-logomark-500.png rename to docs/misc/papermc-logomark-500.png diff --git a/docs/common/pterodactyl-manual.png b/docs/misc/pterodactyl-manual.png similarity index 100% rename from docs/common/pterodactyl-manual.png rename to docs/misc/pterodactyl-manual.png diff --git a/docs/common/pterodactyl-prompt.png b/docs/misc/pterodactyl-prompt.png similarity index 100% rename from docs/common/pterodactyl-prompt.png rename to docs/misc/pterodactyl-prompt.png diff --git a/docusaurus.config.ts b/docusaurus.config.ts index dbacb51c6..ab5691c42 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -71,10 +71,10 @@ const config: Config = { "content-docs", { ...docsCommon, - id: "common", - path: "docs/common", + id: "misc", + path: "docs/misc", routeBasePath: "/", - sidebarPath: require.resolve("./config/sidebar.common"), + sidebarPath: require.resolve("./config/sidebar.misc"), }, ], [ diff --git a/src/components/Projects.tsx b/src/components/Projects.tsx index 29234c0f3..1bae39f74 100644 --- a/src/components/Projects.tsx +++ b/src/components/Projects.tsx @@ -23,10 +23,10 @@ const projects: Project[] = [ link: "/waterfall", }, { - title: "Common", - description: "Pages shared between all PaperMC projects.", + title: "Miscellaneous", + description: "Documentation that does not apply to any specific project.", repo: "PaperMC", - link: "/common", + link: "/misc", }, ]; From 38941ba34aa9973a6fcabd6c160ff5fb61efda1f Mon Sep 17 00:00:00 2001 From: Evan McCarthy Date: Thu, 14 Apr 2022 19:21:19 -0500 Subject: [PATCH 07/14] enable debug plugin --- docusaurus.config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/docusaurus.config.ts b/docusaurus.config.ts index ab5691c42..59fdcdfb8 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -162,6 +162,7 @@ const config: Config = { ], }, ], + "debug", ], themeConfig: { From 8ad6248bcdbe99a1577d677bc5377b9a5399c59d Mon Sep 17 00:00:00 2001 From: Evan McCarthy Date: Thu, 14 Apr 2022 19:41:44 -0500 Subject: [PATCH 08/14] relocate misc category to misc base path --- config/sidebar.misc.ts | 2 +- docs/misc/{misc.md => README.md} | 0 docs/paper/admin/getting-started/README.md | 2 +- docs/velocity/admin/getting-started/README.md | 2 +- .../dev/getting-started/creating-your-first-plugin.md | 4 ++-- docusaurus.config.ts | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) rename docs/misc/{misc.md => README.md} (100%) diff --git a/config/sidebar.misc.ts b/config/sidebar.misc.ts index 197c36aa5..b1c76a5e0 100644 --- a/config/sidebar.misc.ts +++ b/config/sidebar.misc.ts @@ -1,7 +1,7 @@ import type { SidebarsConfig } from "@docusaurus/plugin-content-docs"; const misc: SidebarsConfig = { - primary: ["misc", "java-install", "downloads-api", "assets", "contact"], + primary: ["README", "java-install", "downloads-api", "assets", "contact"], }; export = misc; diff --git a/docs/misc/misc.md b/docs/misc/README.md similarity index 100% rename from docs/misc/misc.md rename to docs/misc/README.md diff --git a/docs/paper/admin/getting-started/README.md b/docs/paper/admin/getting-started/README.md index 3ff5edebe..78eca33b0 100644 --- a/docs/paper/admin/getting-started/README.md +++ b/docs/paper/admin/getting-started/README.md @@ -9,7 +9,7 @@ slug: /getting-started :::tip With the release of Minecraft 1.18, Paper now requires **Java 17** to run. If you don't already have -Java 17, [it's easy to download and install](/java-install-update). +Java 17, [it's easy to download and install](/misc/java-install-update). ::: diff --git a/docs/velocity/admin/getting-started/README.md b/docs/velocity/admin/getting-started/README.md index 1b59a8133..87acd1305 100644 --- a/docs/velocity/admin/getting-started/README.md +++ b/docs/velocity/admin/getting-started/README.md @@ -10,7 +10,7 @@ This page covers how to install and set up a minimal configuration of Velocity. Velocity is written in Java, so if you do not already have Java installed, you will need to install it before you continue. Velocity requires Java 11 or newer. See our -[java installation guide](/java-install-update) for detailed instructions. +[java installation guide](/misc/java-install-update) for detailed instructions. ## Downloading Velocity diff --git a/docs/velocity/dev/getting-started/creating-your-first-plugin.md b/docs/velocity/dev/getting-started/creating-your-first-plugin.md index 97b627a75..94b7e7bdc 100644 --- a/docs/velocity/dev/getting-started/creating-your-first-plugin.md +++ b/docs/velocity/dev/getting-started/creating-your-first-plugin.md @@ -17,8 +17,8 @@ recommend you learn some basic Java before you continue. ## Set up your environment -You're going to need the [JDK](/java-install-update) and an IDE. If you don't have an IDE, IntelliJ -IDEA is recommended. +You're going to need the [JDK](/misc/java-install-update) and an IDE. If you don't have an IDE, +IntelliJ IDEA is recommended. ## Creating the project in your IDE diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 59fdcdfb8..e7c36e603 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -73,7 +73,7 @@ const config: Config = { ...docsCommon, id: "misc", path: "docs/misc", - routeBasePath: "/", + routeBasePath: "/misc", sidebarPath: require.resolve("./config/sidebar.misc"), }, ], From 660d124bfe0487b95bfc5c441d80d12634180a02 Mon Sep 17 00:00:00 2001 From: Evan McCarthy Date: Thu, 14 Apr 2022 20:14:43 -0500 Subject: [PATCH 09/14] add current required redirects currently in cloudflare pages/netlify format. may change depending on eventual deployment decision --- static/_redirects | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 static/_redirects diff --git a/static/_redirects b/static/_redirects new file mode 100644 index 000000000..451804972 --- /dev/null +++ b/static/_redirects @@ -0,0 +1,5 @@ +/intro / +/java-install-update /misc/java-install-update + +/papermc/* /misc/:splat +/velocity/developers/* /velocity/dev/:splat \ No newline at end of file From 380e8154c0efd17384796dd0e1971a33e62bf13d Mon Sep 17 00:00:00 2001 From: Evan McCarthy Date: Fri, 15 Apr 2022 22:55:23 -0500 Subject: [PATCH 10/14] Add category indexes to landing pages and resolve naming issues --- config/navbar.config.ts | 32 +++++++++++++++++-- config/sidebar.paper.ts | 13 +++----- config/sidebar.velocity.ts | 4 +-- docs/paper/admin/README.md | 11 +++++++ .../{README.md => getting-started.md} | 0 docs/paper/dev/README.md | 11 +++++-- docs/velocity/admin/README.md | 7 ++++ docs/velocity/dev/README.md | 11 +++++-- package.json | 2 +- 9 files changed, 74 insertions(+), 17 deletions(-) rename docs/paper/admin/getting-started/{README.md => getting-started.md} (100%) diff --git a/config/navbar.config.ts b/config/navbar.config.ts index a7a7dd98c..44e2ccd7c 100644 --- a/config/navbar.config.ts +++ b/config/navbar.config.ts @@ -11,14 +11,42 @@ const navbar: Omit = { }, items: [ { - to: "paper", + type: "dropdown", label: "Paper", + to: "/paper", position: "left", + activeBaseRegex: "(\\/paper)(.+)?", + items: [ + { + label: "Administration", + to: "/paper/admin", + activeBaseRegex: "(\\/paper/)(?!dev)(.+)?", + }, + { + label: "Development", + to: "/paper/dev", + activeBaseRegex: "(\\/paper\\/dev)(.+)?", + }, + ], }, { - to: "velocity", + type: "dropdown", label: "Velocity", + to: "/velocity", position: "left", + activeBaseRegex: "(\\/velocity)(.+)?", + items: [ + { + label: "Administration", + to: "/velocity/admin", + activeBaseRegex: "(\\/velocity/)(?!dev)(.+)?", + }, + { + label: "Development", + to: "/velocity/dev", + activeBaseRegex: "(\\/velocity\\/dev)(.+)?", + }, + ], }, { to: "waterfall", diff --git a/config/sidebar.paper.ts b/config/sidebar.paper.ts index 9f011076c..3f194e90b 100644 --- a/config/sidebar.paper.ts +++ b/config/sidebar.paper.ts @@ -5,7 +5,7 @@ const paper: SidebarsConfig = { "README", { type: "category", - label: "Server Administrators", + label: "Administration", collapsed: true, link: { type: "doc", @@ -16,14 +16,11 @@ const paper: SidebarsConfig = { type: "category", label: "Getting Started", link: { - type: "doc", - id: "admin/getting-started/README", + type: "generated-index", + slug: "/cat/admin/getting-started", }, items: [ - { - type: "ref", - id: "admin/getting-started/README", - }, + "admin/getting-started/getting-started", "admin/getting-started/adding-plugins", "admin/getting-started/migration", ], @@ -58,7 +55,7 @@ const paper: SidebarsConfig = { }, { type: "category", - label: "Developer's Guide", + label: "Development", collapsed: true, link: { type: "doc", diff --git a/config/sidebar.velocity.ts b/config/sidebar.velocity.ts index 65334ef0e..b51fba8a9 100644 --- a/config/sidebar.velocity.ts +++ b/config/sidebar.velocity.ts @@ -5,7 +5,7 @@ const velocity: SidebarsConfig = { "README", { type: "category", - label: "Server Administrators", + label: "Administration", collapsed: true, link: { type: "doc", @@ -57,7 +57,7 @@ const velocity: SidebarsConfig = { }, { type: "category", - label: "Developers", + label: "Development", collapsed: true, link: { type: "doc", diff --git a/docs/paper/admin/README.md b/docs/paper/admin/README.md index 2aa308967..c5d37505e 100644 --- a/docs/paper/admin/README.md +++ b/docs/paper/admin/README.md @@ -1,4 +1,15 @@ +--- +slug: /admin +--- + +import DocCardList from "@theme/DocCardList"; +import { useCurrentSidebarCategory } from "@docusaurus/theme-common"; + # Paper Server Administration Welcome to the Paper Server Administration Guide! This guide includes information and tutorials regarding the administration of a Paper server. + +--- + + diff --git a/docs/paper/admin/getting-started/README.md b/docs/paper/admin/getting-started/getting-started.md similarity index 100% rename from docs/paper/admin/getting-started/README.md rename to docs/paper/admin/getting-started/getting-started.md diff --git a/docs/paper/dev/README.md b/docs/paper/dev/README.md index fb0b4697c..f75f79230 100644 --- a/docs/paper/dev/README.md +++ b/docs/paper/dev/README.md @@ -1,4 +1,11 @@ -# Paper Developer's Guide +import DocCardList from "@theme/DocCardList"; +import { useCurrentSidebarCategory } from "@docusaurus/theme-common"; -Welcome to the Paper Developer's Guide! This guide includes information and tutorials for developers +# Development Guide + +Welcome to the Paper Development Guide! This guide includes information and tutorials for developers to create and expand on Paper plugins. + +--- + + diff --git a/docs/velocity/admin/README.md b/docs/velocity/admin/README.md index 3c559f28a..29d1948d5 100644 --- a/docs/velocity/admin/README.md +++ b/docs/velocity/admin/README.md @@ -1,4 +1,11 @@ +import DocCardList from "@theme/DocCardList"; +import { useCurrentSidebarCategory } from "@docusaurus/theme-common"; + # Velocity Proxy Administration Welcome to the Velocity Proxy Administration Guide! This guide includes information and tutorials regarding the administration of a Velocity proxy. + +--- + + diff --git a/docs/velocity/dev/README.md b/docs/velocity/dev/README.md index 0ad72db26..099843969 100644 --- a/docs/velocity/dev/README.md +++ b/docs/velocity/dev/README.md @@ -1,4 +1,11 @@ -# Developer's Guide +import DocCardList from "@theme/DocCardList"; +import { useCurrentSidebarCategory } from "@docusaurus/theme-common"; -Welcome to the Velocity Developer's Guide! This guide includes information and tutorials for +# Development Guide + +Welcome to the Velocity Development Guide! This guide includes information and tutorials for developers to create and expand on Velocity plugins. + +--- + + diff --git a/package.json b/package.json index 5712fe508..8dc82b052 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": true, "scripts": { "docusaurus": "docusaurus", - "start": "yarn build:config && docusaurus start", + "start": "yarn build:config && docusaurus start --no-open", "build": "yarn build:config && docusaurus build", "clear": "docusaurus clear", "serve": "docusaurus serve", From e16a3b8e89ff01485cf9150fa31f07412120fb3a Mon Sep 17 00:00:00 2001 From: Evan McCarthy Date: Sat, 7 May 2022 21:44:31 -0500 Subject: [PATCH 11/14] swizzle DropdownNavbarItem --- src/theme/NavbarItem/DropdownNavbarItem.tsx | 175 ++++++++++++++++++++ 1 file changed, 175 insertions(+) create mode 100644 src/theme/NavbarItem/DropdownNavbarItem.tsx diff --git a/src/theme/NavbarItem/DropdownNavbarItem.tsx b/src/theme/NavbarItem/DropdownNavbarItem.tsx new file mode 100644 index 000000000..a2d25306e --- /dev/null +++ b/src/theme/NavbarItem/DropdownNavbarItem.tsx @@ -0,0 +1,175 @@ +import React, { useState, useRef, useEffect } from "react"; +import clsx from "clsx"; +import { + isSamePath, + useCollapsible, + Collapsible, + isRegexpStringMatch, + useLocalPathname, +} from "@docusaurus/theme-common"; +import type { DesktopOrMobileNavBarItemProps, Props } from "@theme/NavbarItem/DropdownNavbarItem"; +import type { LinkLikeNavbarItemProps } from "@theme/NavbarItem"; + +import NavbarNavLink from "@theme/NavbarItem/NavbarNavLink"; +import NavbarItem from "@theme/NavbarItem"; + +const dropdownLinkActiveClass = "dropdown__link--active"; + +function isItemActive(item: LinkLikeNavbarItemProps, localPathname: string): boolean { + if (isSamePath(item.to, localPathname)) { + return true; + } + if (isRegexpStringMatch(item.activeBaseRegex, localPathname)) { + return true; + } + if (item.activeBasePath && localPathname.startsWith(item.activeBasePath)) { + return true; + } + return false; +} + +function containsActiveItems( + items: readonly LinkLikeNavbarItemProps[], + localPathname: string +): boolean { + return items.some((item) => isItemActive(item, localPathname)); +} + +function DropdownNavbarItemDesktop({ + items, + position, + className, + ...props +}: DesktopOrMobileNavBarItemProps) { + const dropdownRef = useRef(null); + const [showDropdown, setShowDropdown] = useState(false); + + useEffect(() => { + const handleClickOutside = (event: MouseEvent | TouchEvent) => { + if (!dropdownRef.current || dropdownRef.current.contains(event.target as Node)) { + return; + } + setShowDropdown(false); + }; + + document.addEventListener("mousedown", handleClickOutside); + document.addEventListener("touchstart", handleClickOutside); + + return () => { + document.removeEventListener("mousedown", handleClickOutside); + document.removeEventListener("touchstart", handleClickOutside); + }; + }, [dropdownRef]); + + return ( +
+ e.preventDefault()} + onKeyDown={(e) => { + if (e.key === "Enter") { + e.preventDefault(); + setShowDropdown(!showDropdown); + } + }} + > + {props.children ?? props.label} + +
    + {items.map((childItemProps, i) => ( + { + if (i === items.length - 1 && e.key === "Tab") { + e.preventDefault(); + setShowDropdown(false); + const nextNavbarItem = dropdownRef.current!.nextElementSibling; + if (nextNavbarItem) { + const targetItem = + nextNavbarItem instanceof HTMLAnchorElement + ? nextNavbarItem + : // Next item is another dropdown; focus on the inner + // anchor element instead so there's outline + nextNavbarItem.querySelector("a"); + (targetItem as HTMLElement).focus(); + } + } + }} + activeClassName={dropdownLinkActiveClass} + {...childItemProps} + key={i} + /> + ))} +
+
+ ); +} + +function DropdownNavbarItemMobile({ + items, + className, + position, // Need to destructure position from props so that it doesn't get passed on. + ...props +}: DesktopOrMobileNavBarItemProps) { + const localPathname = useLocalPathname(); + const containsActive = containsActiveItems(items, localPathname); + + const { collapsed, toggleCollapsed, setCollapsed } = useCollapsible({ + initialState: () => !containsActive, + }); + + // Expand/collapse if any item active after a navigation + useEffect(() => { + if (containsActive) { + setCollapsed(!containsActive); + } + }, [localPathname, containsActive, setCollapsed]); + + return ( +
  • + { + e.preventDefault(); + toggleCollapsed(); + }} + > + {props.children ?? props.label} + + + {items.map((childItemProps, i) => ( + + ))} + +
  • + ); +} + +export default function DropdownNavbarItem({ mobile = false, ...props }: Props): JSX.Element { + const Comp = mobile ? DropdownNavbarItemMobile : DropdownNavbarItemDesktop; + return ; +} From 73937f3c38efc8ec81af86e73dee74a5b5201b9d Mon Sep 17 00:00:00 2001 From: Evan McCarthy Date: Sat, 7 May 2022 21:47:54 -0500 Subject: [PATCH 12/14] mark desktop dropdown as active when has active children --- src/theme/NavbarItem/DropdownNavbarItem.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/theme/NavbarItem/DropdownNavbarItem.tsx b/src/theme/NavbarItem/DropdownNavbarItem.tsx index a2d25306e..658a3fbb5 100644 --- a/src/theme/NavbarItem/DropdownNavbarItem.tsx +++ b/src/theme/NavbarItem/DropdownNavbarItem.tsx @@ -74,7 +74,11 @@ function DropdownNavbarItemDesktop({ aria-expanded={showDropdown} role="button" href={props.to ? undefined : "#"} - className={clsx("navbar__link", className)} + className={clsx( + "navbar__link", + className, + containsActiveItems(items, useLocalPathname()) && "navbar__link--active" + )} // PaperMC/docs - mark as active when has active children {...props} onClick={props.to ? undefined : (e) => e.preventDefault()} onKeyDown={(e) => { From 731f5c64a820b95a7d6ab9d1329ce4cc2d260418 Mon Sep 17 00:00:00 2001 From: Evan McCarthy Date: Sat, 7 May 2022 21:56:45 -0500 Subject: [PATCH 13/14] better implement same idea --- src/theme/NavbarItem/DropdownNavbarItem.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/theme/NavbarItem/DropdownNavbarItem.tsx b/src/theme/NavbarItem/DropdownNavbarItem.tsx index 658a3fbb5..aa9d94353 100644 --- a/src/theme/NavbarItem/DropdownNavbarItem.tsx +++ b/src/theme/NavbarItem/DropdownNavbarItem.tsx @@ -74,11 +74,8 @@ function DropdownNavbarItemDesktop({ aria-expanded={showDropdown} role="button" href={props.to ? undefined : "#"} - className={clsx( - "navbar__link", - className, - containsActiveItems(items, useLocalPathname()) && "navbar__link--active" - )} // PaperMC/docs - mark as active when has active children + className={clsx("navbar__link", className)} + activeClassName="navbar__link--active" // PaperMC/docs - show as active when active {...props} onClick={props.to ? undefined : (e) => e.preventDefault()} onKeyDown={(e) => { From 0d6d778816304253f2187e6441f00fe1a3b667c1 Mon Sep 17 00:00:00 2001 From: Evan McCarthy Date: Tue, 10 May 2022 19:47:31 -0500 Subject: [PATCH 14/14] only show dropdown when page not active --- src/theme/NavbarItem/DropdownNavbarItem.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/theme/NavbarItem/DropdownNavbarItem.tsx b/src/theme/NavbarItem/DropdownNavbarItem.tsx index aa9d94353..b5f9ab520 100644 --- a/src/theme/NavbarItem/DropdownNavbarItem.tsx +++ b/src/theme/NavbarItem/DropdownNavbarItem.tsx @@ -61,13 +61,15 @@ function DropdownNavbarItemDesktop({ }; }, [dropdownRef]); + const active = isRegexpStringMatch(props.activeBaseRegex, useLocalPathname()) + return (
    {props.children ?? props.label} -
      + {!active &&
        {items.map((childItemProps, i) => ( ))} -
      +
    }
    ); }