Skip to content

feat: Add Adventure docs #573

New issue

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

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

Already on GitHub? Sign in to your account

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
3114501
Add Adventure docs
Strokkur424 Apr 20, 2025
ef30e18
pnpm format
Strokkur424 May 14, 2025
64631b2
Refactor spell checking
Strokkur424 May 14, 2025
e3509c2
Add fallback json if stuff is broken
Strokkur424 May 14, 2025
07bd63a
Try to fix compile errors
Strokkur424 May 14, 2025
4f3c5a9
Cleanup releases.ts
Strokkur424 May 14, 2025
a30b5db
Add more debug logging
Strokkur424 May 18, 2025
d25d4d5
pnpm format
Strokkur424 May 19, 2025
9491d49
Update to be up-to-date with latest Adventure docs
Strokkur424 May 19, 2025
7ed6aa4
Add/improve dynamic mod version fetching
Strokkur424 May 19, 2025
09e6096
Move adventure changelogs to pages section for manual ToC creation
Strokkur424 May 19, 2025
c3136d1
Add prepend tag attribute
Strokkur424 May 19, 2025
f657831
format
Strokkur424 May 19, 2025
77b7196
refactor: use GitHub releases Atom feed
zlataovce May 20, 2025
924ee19
fix: oops
zlataovce May 20, 2025
078ab23
fix: exclude custom pages from link validator
zlataovce May 20, 2025
277f809
chore: remove Adventure docs contributing page
zlataovce May 20, 2025
ce4433b
refactor: rework social icons for Adventure links
zlataovce May 20, 2025
5f24d8f
refactor: build system dependency references
zlataovce Jun 1, 2025
19f052a
refactor: rename `.mdx` files to `.md` where no MDX markup is used
zlataovce Jun 1, 2025
073ebf1
refactor: change docs.oracle.com links to Javadoc shortcuts
zlataovce Jun 1, 2025
a6c2cc2
refactor: style fixes, add notable index pages to sidebar
zlataovce Jun 1, 2025
5deaf85
fix: deleted too much
zlataovce Jun 1, 2025
48521e1
fix: change index page names only in sidebar
zlataovce Jun 1, 2025
f55dbd4
fix: comments
zlataovce Jun 27, 2025
61d04ff
fix: remove automatic Adventure versioning logic
zlataovce Jun 27, 2025
d6575c2
feat: move Adventure-supported MC versions to replaceable constant
zlataovce Jun 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 41 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ To ensure a smooth and collaborative contribution process, please follow the gui
5. [Version tags](#version-tags)
6. [Automatic constant replacement](#automatic-constant-replacement)
7. [Linking to Javadocs](#linking-to-javadocs)
8. [Code of Conduct](#code-of-conduct)
8. [Referencing a build system dependency](#referencing-a-build-system-dependency)
9. [Code of Conduct](#code-of-conduct)

## Introduction

Expand Down Expand Up @@ -181,6 +182,45 @@ For that, you can use the `jd:project_name[:module_name][:class_or_member_refere
[java.sql's Connection](jd:java:java.sql:java.sql.Connection)
```

## Referencing a build system dependency

If you wish to reference a build system (i.e. Gradle or Maven) dependency, you can use the `Dependency` component.

```mdxjs
import { LATEST_ADVENTURE_API_RELEASE } from "/src/utils/versions";

{/* uses the "default" template */}
<Dependency group="net.kyori" name="adventure-api" version={LATEST_ADVENTURE_API_RELEASE} />
```

The `default` template is fit for use with a simple `implementation`/`compile`-scope dependency from Maven Central,
however you can also make your own template.

If you need to declare the dependency in a unique way and/or need to add other configuration in the build script, simply use
the `Tabs` component with the corresponding code blocks - **do not make a template unless you plan to use it more than once**.

```mdxjs
import { Tabs, TabItem } from "@astrojs/starlight/components";

<Tabs syncKey="build-system">
<TabItem label="Gradle (Kotlin)">
```kotlin title="build.gradle.kts"
// my awesome build script in Kotlin
```
</TabItem>
<TabItem label="Gradle (Groovy)">
```groovy title="build.gradle"
// my awesome build script in Groovy
```
</TabItem>
<TabItem label="Maven">
```xml title="pom.xml"
<!-- my awesome build script in XML -->
```
</TabItem>
</Tabs>
```

## Code of Conduct

Contributors are expected to follow the [Community Guidelines](https://papermc.io/community/guidelines) of the PaperMC organization in all
Expand Down
2 changes: 2 additions & 0 deletions _redirects
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@
/paper/dev/commands /paper/dev/command-api/basics/introduction
/paper/dev/command-api/commands /paper/dev/command-api/basics/introduction
/paper/dev/command-api/arguments /paper/dev/command-api/basics/arguments-and-literals
/adventure/contributing https://github.com/PaperMC/docs/blob/main/CONTRIBUTING.md
/adventure/version-history/adventure-platform-fabric /adventure/version-history/adventure-platform-mod
114 changes: 108 additions & 6 deletions astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ import starlightLinksValidator from "starlight-links-validator";
import starlightSidebarTopics from "starlight-sidebar-topics";
import codeConstantsPlugin from "./src/utils/remark/code_const";
import javadocPlugin from "./src/utils/remark/javadoc";
import miniMessageHighlight from "./src/utils/shiki/mm.tmLanguage.json";
import {
LATEST_ADVENTURE_API_RELEASE,
LATEST_ADVENTURE_PLATFORM_MOD_RELEASE,
LATEST_ADVENTURE_PLATFORM_RELEASE,
LATEST_ADVENTURE_SUPPORTED_MC,
LATEST_ADVENTURE_SUPPORTED_MC_RANGE,
LATEST_ANSI_RELEASE,
LATEST_FOLIA_RELEASE,
LATEST_MC_RELEASE,
LATEST_PAPER_RELEASE,
Expand Down Expand Up @@ -47,6 +54,9 @@ export default defineConfig({
{ icon: "github", label: "folia:GitHub", href: "https://github.com/PaperMC/Folia" },
{ icon: "seti:java", label: "folia:Javadoc", href: `https://jd.papermc.io/folia/${LATEST_FOLIA_RELEASE}` },

{ icon: "github", label: "adventure:GitHub", href: "https://github.com/KyoriPowered/adventure" },
{ icon: "seti:java", label: "adventure:Javadoc", href: "https://jd.advntr.dev" },

{ icon: "github", label: "waterfall:GitHub", href: "https://github.com/PaperMC/Waterfall" },
{
icon: "seti:java",
Expand Down Expand Up @@ -85,6 +95,9 @@ export default defineConfig({
},
plugins: [
starlightLinksValidator({
exclude: [
"/adventure/version-history/*", // custom pages
],
errorOnInvalidHashes: false, // enable if you want to check hashes - it doesn't work with config diagrams
}),
starlightSidebarTopics(
Expand Down Expand Up @@ -345,19 +358,98 @@ export default defineConfig({
},
],
},
{
id: "adventure",
label: "Adventure",
link: "/adventure/",
icon: "adventure",
items: [
"adventure/getting-started",
"adventure/community-libraries",
"adventure/faq",
"adventure/audiences",
"adventure/text",
{
label: "Text serializers",
items: [
"adventure/serializer",
"adventure/serializer/json",
"adventure/serializer/gson",
"adventure/serializer/legacy",
"adventure/serializer/plain",
{
label: "MiniMessage",
items: [
"adventure/minimessage",
"adventure/minimessage/format",
"adventure/minimessage/api",
"adventure/minimessage/dynamic-replacements",
"adventure/minimessage/translator",
],
},
"adventure/serializer/ansi",
],
},
"adventure/bossbar",
"adventure/sound",
"adventure/titles",
"adventure/book",
"adventure/tablist",
"adventure/resource-pack",
{
label: "MiniMessage",
items: [
"adventure/minimessage",
"adventure/minimessage/format",
"adventure/minimessage/api",
"adventure/minimessage/dynamic-replacements",
"adventure/minimessage/translator",
],
},
"adventure/localization",
{
label: "Platforms",
items: [
"adventure/platform",
"adventure/platform/native",
"adventure/platform/bukkit",
"adventure/platform/bungeecord",
"adventure/platform/spongeapi",
"adventure/platform/modded",
"adventure/platform/fabric",
"adventure/platform/neoforge",
"adventure/platform/viaversion",
"adventure/platform/implementing",
],
},
{
label: "Migrating to Adventure from other APIs",
items: [
"adventure/migration",
"adventure/migration/bungeecord-chat-api",
"adventure/migration/text-3.x",
],
},
{
label: "Version history",
items: [
{ label: "adventure", link: "/adventure/version-history/adventure" },
{ label: "adventure-platform", link: "/adventure/version-history/adventure-platform" },
{
label: "adventure-platform-mod",
link: "/adventure/version-history/adventure-platform-mod",
},
],
},
],
},
{
id: "waterfall",
label: "Waterfall",
link: "/waterfall/",
icon: "waterfall",
items: ["waterfall/getting-started", "waterfall/configuration"],
},
{
id: "adventure",
label: "Adventure",
link: "https://docs.advntr.dev/",
icon: "adventure",
},
{
id: "misc",
label: "Miscellaneous",
Expand Down Expand Up @@ -414,6 +506,7 @@ export default defineConfig({
"/velocity/dev/api",
],
folia: ["/folia/admin", "/folia/admin/reference"],
adventure: ["/adventure/version-history"],
waterfall: ["/waterfall"],
misc: ["/misc", "/misc/tools"],
},
Expand All @@ -425,6 +518,9 @@ export default defineConfig({
extractFileNameFromCode: false,
},
emitExternalStylesheet: false,
shiki: {
langs: [miniMessageHighlight],
},
},
}),
svelte(),
Expand Down Expand Up @@ -458,6 +554,12 @@ export default defineConfig({
LATEST_FOLIA_RELEASE,
LATEST_WATERFALL_RELEASE,
LATEST_USERDEV_RELEASE,
LATEST_ADVENTURE_SUPPORTED_MC,
LATEST_ADVENTURE_SUPPORTED_MC_RANGE,
LATEST_ADVENTURE_API_RELEASE,
LATEST_ADVENTURE_PLATFORM_RELEASE,
LATEST_ADVENTURE_PLATFORM_MOD_RELEASE,
LATEST_ANSI_RELEASE,
},
},
],
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"format:check": "prettier . --check"
},
"dependencies": {
"@ascorbic/feed-loader": "^1.0.4",
"@astrojs/markdown-remark": "^6.3.1",
"@astrojs/starlight": "^0.34.3",
"@astrojs/svelte": "^7.0.13",
Expand Down
Loading