diff --git a/.editorconfig b/.editorconfig index bc0c2752..77b16e30 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,3 +8,6 @@ indent_size = 2 max_line_length = 100 insert_final_newline = true trim_trailing_whitespace = true + +[{*.md,*.mdx}] +indent_size = 4 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ea53442f..b898dafc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -106,49 +106,49 @@ of a few ways: 1. `SoftwareVersion` component - This component is used to embed the current version of the software into the documentation. An example of this would be: + This component is used to embed the current version of the software into the documentation. An example of this would be: - ```jsx - // e.g. 1.19.2 - // e.g. 1.19 - // e.g. 1 + ```jsx + // e.g. 1.19.2 + // e.g. 1.19 + // e.g. 1 - // You can set the project name to be used for the versioning (defaults to paper): - // e.g. 3.3.0-SNAPSHOT - ``` + // You can set the project name to be used for the versioning (defaults to paper): + // e.g. 3.3.0-SNAPSHOT + ``` 2. `Javadoc` component - This component is used to embed a link to the current version of the corresponding Javadoc. An example of this would be: + This component is used to embed a link to the current version of the corresponding Javadoc. An example of this would be: - ```jsx - here - // The project can also be set here, and defaults to Paper - ``` + ```jsx + here + // The project can also be set here, and defaults to Paper + ``` 3. `VersionFormattedCode` component - This component is used to embed a code block with the current version of the software. An example of this would be: - - ````jsx - - ```⠀ - name: Paper-Test-Plugin - version: '1.0' - main: io.papermc.testplugin.TestPlugin - description: Paper Test Plugin - api-version: '%%_MAJ_MIN_PAT_MC_%%' - bootstrapper: io.papermc.testplugin.TestPluginBootstrap - loader: io.papermc.testplugin.TestPluginLoader - ```⠀ - - - // The possible placeholders are: - %%_MAJ_MIN_MC_%% - Major-Minor Paper Version (E.g. 1.20) - %%_MAJ_MIN_PAT_MC_%% - Major-Minor-Patch Paper Version (E.g. 1.20.4) - %%_MAJ_MIN_VEL_%% - Major Velocity Version (E.g. 3.1.0) - %%_MAJ_MIN_PAT_VEL_%% - Major-Minor-Patch Velocity Version (E.g. 3.1.1-SNAPSHOT) - ```` + This component is used to embed a code block with the current version of the software. An example of this would be: + + ````jsx + + ```⠀ + name: Paper-Test-Plugin + version: '1.0' + main: io.papermc.testplugin.TestPlugin + description: Paper Test Plugin + api-version: '%%_MAJ_MIN_PAT_MC_%%' + bootstrapper: io.papermc.testplugin.TestPluginBootstrap + loader: io.papermc.testplugin.TestPluginLoader + ```⠀ + + + // The possible placeholders are: + %%_MAJ_MIN_MC_%% - Major-Minor Paper Version (E.g. 1.20) + %%_MAJ_MIN_PAT_MC_%% - Major-Minor-Patch Paper Version (E.g. 1.20.4) + %%_MAJ_MIN_VEL_%% - Major Velocity Version (E.g. 3.1.0) + %%_MAJ_MIN_PAT_VEL_%% - Major-Minor-Patch Velocity Version (E.g. 3.1.1-SNAPSHOT) + ```` When the major version of the software changes, the docs will still need to have a "snapshot" created to keep documentation for older versions. This is done by using Docusaurus's `version` command: diff --git a/README.md b/README.md index 7f153fa5..3d0c6677 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@ How to get docs running on your local machine for development. ### Prerequisites -- [node](https://nodejs.org) -- [pnpm](https://pnpm.io/installation) +- [node](https://nodejs.org) +- [pnpm](https://pnpm.io/installation) ### Local Development diff --git a/docs/paper/dev/getting-started/project-setup.mdx b/docs/paper/dev/getting-started/project-setup.mdx index 0dd69530..033bb489 100644 --- a/docs/paper/dev/getting-started/project-setup.mdx +++ b/docs/paper/dev/getting-started/project-setup.mdx @@ -27,24 +27,69 @@ You will land into the `build.gradle.kts` file where you can add your dependenci ### Adding Paper as a dependency -To add Paper as a dependency, you will need to add the Paper repository to your `build.gradle.kts` file as well as the dependency itself. +To add Paper as a dependency, you will need to add the Paper repository to your `build.gradle.kts` or `pom.xml` file as well as the dependency itself. - -``` -repositories { - mavenCentral() - maven("https://repo.papermc.io/repository/maven-public/") -} - -dependencies { - compileOnly("io.papermc.paper:paper-api:%%_MAJ_MIN_PAT_MC_%%-R0.1-SNAPSHOT") -} - -java { - toolchain.languageVersion.set(JavaLanguageVersion.of(21)) -} -``` - + + + + ``` + repositories { + maven { + name = "papermc" + url = uri("https://repo.papermc.io/repository/maven-public/") + } + } + + dependencies { + compileOnly("io.papermc.paper:paper-api:%%_MAJ_MIN_PAT_MC_%%-R0.1-SNAPSHOT") + } + + java { + toolchain.languageVersion.set(JavaLanguageVersion.of(21)) + } + ``` + + + + + ``` + repositories { + maven { + name = 'papermc' + url = 'https://repo.papermc.io/repository/maven-public/' + } + } + + dependencies { + compileOnly 'io.papermc.paper:paper-api:%%_MAJ_MIN_PAT_MC_%%-R0.1-SNAPSHOT' + } + ``` + + + + + ``` + + + + papermc + https://repo.papermc.io/repository/maven-public/ + + + + + + io.papermc.paper + paper-api + %%_MAJ_MIN_PAT_MC_%%-R0.1-SNAPSHOT + provided + + + + ``` + + + ### Setting up the `src` directory