Skip to content

Commit 36fae9d

Browse files
zlataovceStrokkur424
authored andcommitted
refactor: style fixes, add notable index pages to sidebar
1 parent 9bb9497 commit 36fae9d

File tree

19 files changed

+54
-50
lines changed

19 files changed

+54
-50
lines changed

astro.config.ts

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -368,15 +368,17 @@ export default defineConfig({
368368
"adventure/audiences",
369369
"adventure/text",
370370
{
371-
label: "Text Serializers",
371+
label: "Text serializers",
372372
items: [
373+
"adventure/serializer",
373374
"adventure/serializer/json",
374375
"adventure/serializer/gson",
375376
"adventure/serializer/legacy",
376377
"adventure/serializer/plain",
377378
{
378379
label: "MiniMessage",
379380
items: [
381+
"adventure/minimessage",
380382
"adventure/minimessage/format",
381383
"adventure/minimessage/api",
382384
"adventure/minimessage/dynamic-replacements",
@@ -395,6 +397,7 @@ export default defineConfig({
395397
{
396398
label: "MiniMessage",
397399
items: [
400+
"adventure/minimessage",
398401
"adventure/minimessage/format",
399402
"adventure/minimessage/api",
400403
"adventure/minimessage/dynamic-replacements",
@@ -405,6 +408,7 @@ export default defineConfig({
405408
{
406409
label: "Platforms",
407410
items: [
411+
"adventure/platform",
408412
"adventure/platform/native",
409413
"adventure/platform/bukkit",
410414
"adventure/platform/bungeecord",
@@ -418,10 +422,14 @@ export default defineConfig({
418422
},
419423
{
420424
label: "Migrating to Adventure from other APIs",
421-
items: ["adventure/migration/bungeecord-chat-api", "adventure/migration/text-3.x"],
425+
items: [
426+
"adventure/migration",
427+
"adventure/migration/bungeecord-chat-api",
428+
"adventure/migration/text-3.x",
429+
],
422430
},
423431
{
424-
label: "Version History",
432+
label: "Version history",
425433
items: [
426434
{ label: "adventure", link: "/adventure/version-history/adventure" },
427435
{ label: "adventure-platform", link: "/adventure/version-history/adventure-platform" },
@@ -496,13 +504,6 @@ export default defineConfig({
496504
"/velocity/dev/api",
497505
],
498506
folia: ["/folia/admin", "/folia/admin/reference"],
499-
adventure: [
500-
"/adventure/serializer",
501-
"/adventure/minimessage",
502-
"/adventure/platform",
503-
"/adventure/migration",
504-
"/adventure/version-history",
505-
],
506507
waterfall: ["/waterfall"],
507508
misc: ["/misc", "/misc/tools"],
508509
},

src/content/docs/adventure/bossbar.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
title: Boss Bars
2+
title: Boss bars
33
description: A guide to Adventure BossBars.
44
---
55

6-
## Constructing a Boss Bar
6+
## Constructing a BossBar
77

88
Boss Bars are composed of:
99
* A component used for the title of the boss bar
@@ -39,7 +39,7 @@ public void hideActiveBossBar(final @NonNull Audience target) {
3939
}
4040
```
4141

42-
## Changing an active Boss Bar
42+
## Changing an active BossBar
4343

4444
Boss bars are mutable and listen for changes on their object,
4545
the in-game view will change automatically without having to manually refresh it!

src/content/docs/adventure/migration/bungeecord-chat-api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ It is strongly recommended you read about [Audiences](/adventure/audiences) firs
1212
which limits functionality to specific user types, Adventure allows only the specific
1313
operations that apply to an audience to be taken.
1414

15-
## Decoration and Styling
15+
## Decoration and styling
1616

1717
The BungeeCord Chat API stores all decorations in the `BaseComponent`. Adventure separates
1818
out styles into their own `Style` class.
@@ -21,7 +21,7 @@ BungeeCord allows you to merge the styles from one component into another. Adven
2121
equivalent methods that merge styles together, or allows you to replace the styles on one
2222
component with another.
2323

24-
## Chat Colors
24+
## Chat colors
2525

2626
Adventure's chat color and styling hierarchy differs from that of BungeeCord's `ChatColor`
2727
API. This is probably where the most stark contrast between the Adventure API and BungeeCord/Bukkit

src/content/docs/adventure/migration/index.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
---
2-
title: Migrating to Adventure from other APIs
2+
title: Overview
33
description: Moving from other chat APIs to Adventure.
4+
tableOfContents: false
45
---
56

67
Moving to Adventure from other APIs is fairly straightforward. These guides
78
provide advice and replacements for tasks in other APIs.
89

910
* [Migrating from the BungeeCord Chat API](/adventure/migration/bungeecord-chat-api)
1011
* [Audiences](/adventure/migration/bungeecord-chat-api#audiences)
11-
* [Decoration and Styling](/adventure/migration/bungeecord-chat-api#decoration-and-styling)
12-
* [Chat Colors](/adventure/migration/bungeecord-chat-api#chat-colors)
12+
* [Decoration and styling](/adventure/migration/bungeecord-chat-api#decoration-and-styling)
13+
* [Chat colors](/adventure/migration/bungeecord-chat-api#chat-colors)
1314
* [Differences in `ComponentBuilder`](/adventure/migration/bungeecord-chat-api#differences-in-componentbuilder)
1415
* [Immutability](/adventure/migration/bungeecord-chat-api#immutability)
1516
* [Serializers](/adventure/migration/bungeecord-chat-api#serializers)

src/content/docs/adventure/minimessage/api.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Some platforms already provide MiniMessage natively. In this case you will not n
1818

1919
:::
2020

21-
## Getting Started
21+
## Getting started
2222

2323
MiniMessage exposes a simple API via the `MiniMessage` class.
2424

@@ -71,7 +71,7 @@ which throws exceptions on unclosed tags, but still will allow any improperly sp
7171
To capture information on why a parse may have failed, `MiniMessage.Builder#debug(Consumer<String>)` can be provided, which will accept debug logging for an input string.
7272

7373

74-
## Tag Resolvers
74+
## Tag resolvers
7575

7676
All tag resolution goes through tag resolvers. There is one global tag resolver, which describes the tags available through a `MiniMessage` instance, plus parse-specific resolvers which can provide additional input-specific tags.
7777

@@ -105,7 +105,7 @@ assertEquals(Component.text("<bold>Hai", NamedTextColor.GREEN), parsed);
105105

106106
Because the `<bold>` tag is not enabled on this builder, the bold tag is interpreted as literal text.
107107

108-
### Handling Arguments
108+
### Handling arguments
109109

110110
Tag resolvers have an `ArgumentQueue` parameter, which provides any tag arguments that are present in the input. Helper methods on `Tag.Argument` can assist with conversions of the tag.
111111

@@ -175,7 +175,7 @@ Once the whole parse tree has been visited, the `postVisit()` method is called.
175175

176176
Next, the `Modifying` instance enters the application phase, where the component tree is presented to the tag for transformation. This allows the tag to *modify* the contents of these components, giving it its name.
177177

178-
### Parser Directives
178+
### Parser directives
179179

180180
Parser directives are a special kind of tag, as they are instructions for the parser, and therefore cannot be implemented by end users.
181181

src/content/docs/adventure/minimessage/dynamic-replacements.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Dynamic Replacements
2+
title: Dynamic replacements
33
description: A guide on tag resolvers.
44
---
55

src/content/docs/adventure/minimessage/format.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ the opening quote character can be escaped (`'` or `"`). In either place, the es
5353
In locations where escaping is not supported, the literal escape character will be passed through. In locations where escaping *is* supported but a literal escape character is desired, the escape character can itself be escaped to produce a `\`.
5454

5555
The default tags try to represent components in a manner compatible with Vanilla, but simplifying some elements. It might be helpful to
56-
use [the minecraft wiki](https://minecraft.wiki/w/Raw_JSON_text_format) as a reference for the Vanilla component system, especially
56+
use [the Minecraft wiki](https://minecraft.wiki/w/Raw_JSON_text_format) as a reference for the Vanilla component system, especially
5757
for things like the actions and values of click and hover events.
5858

5959
The [MiniMessage Web Viewer](https://webui.advntr.dev) allows testing MiniMessage text locally, without having to spin up a Minecraft instance.

src/content/docs/adventure/minimessage/index.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
2-
title: MiniMessage
3-
description: Documentation regarding MiniMessage
2+
title: Overview
3+
description: Documentation regarding MiniMessage.
4+
tableOfContents: false
45
---
56

67
The MiniMessage format is a simple string representation of chat components, designed to be easy for end users to learn, and for developers to extend.
@@ -13,5 +14,5 @@ If you're looking to write messages with MiniMessage, take a look at the [MiniMe
1314

1415
- [Format](/adventure/minimessage/format)
1516
- [API](/adventure/minimessage/api)
16-
- [Dynamic Replacements](/adventure/minimessage/dynamic-replacements)
17-
- [MiniMessage Translator](/adventure/minimessage/translator)
17+
- [Dynamic replacements](/adventure/minimessage/dynamic-replacements)
18+
- [MiniMessage translator](/adventure/minimessage/translator)

src/content/docs/adventure/minimessage/translator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: MiniMessage Translator
2+
title: MiniMessage translator
33
description: A guide on the MiniMessage translator.
44
---
55

src/content/docs/adventure/platform/implementing.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Implementing Platforms
2+
title: Implementing platforms
33
description: Implementing Adventure for your own platform.
44
---
55

@@ -12,7 +12,7 @@ cover the common points. Please don't be afraid to ask us questions, and togethe
1212

1313
## Services
1414

15-
### `ComponentSerializer` Services
15+
### `ComponentSerializer` services
1616

1717
Most of the serializers (Gson, legacy, etc.) have `Provider` SPI's that allow customizing the default behaviors of serializers. These are most applicable for the Gson/other JSON
1818
serializers where the data structures have changed over time, but the legacy serializer's options can be worth referencing too. See the Javadoc for each serializer for more information.
@@ -22,14 +22,14 @@ For any `JSONComponentSerializer` subtype, we have tried to gather relevant tuna
2222
interface. We offer an implementation that uses `adventure-nbt` as a separate submodule, but platforms may wish to use a native NBT library for this instead.
2323
Both of these options should be set on builders in the appropriate `Provider` implementation.
2424

25-
### Data Component Values
25+
### Data component values
2626

2727
To handle storing platform-specific data on `show_item` hover events, we expose opaque data objects in-API. Platforms should provide logic to convert between different
2828
implementations by providing an implementation of `DataComponentValueConverterRegistry.Provider`. For the most part this is just converting between platform-specific types
2929
and the generic `TagSerializable` and `Removed` types, but platforms should make sure to include converters to `GsonDataComponentValue` (from both platform types
3030
*and* the generic `TagSerializable` that requires parsing SNBT for a conversion to occur).
3131

32-
### Click Callbacks
32+
### Click callbacks
3333

3434
As callbacks are a commonly desired feature, Adventure provides a 'virtual' click event type for callback functions. This action is not persistent between runs, and needs
3535
platforms to register a command to trigger callbacks to execute. This is implemented via the `ClickCallback.Provider` SPI. This command should not be sent as part of the
@@ -38,15 +38,15 @@ command tree that clients receive to avoid spamming them.
3838
Platforms implementing the click callback provider must register a command at the appropriate time, and maintain a registry of active callbacks that is added to any time a
3939
callback command is requested. The platform is responsible for ensuring any execution conditions apply and implementing the effects of any `Option`s that may be set on the callback.
4040

41-
### Component Logging
41+
### Component logging
4242

4343
`ComponentLogger`, as part of the `adventure-text-logger-slf4j` module, provides a logging interface that extends SLF4J and wraps any existing SLF4J logger (compatible with
4444
v1 and v2). Platforms are responsible for providing the adapter that looks up the appropriate logger by name and serializes components to text.
4545

4646
This should involve performing any translations if necessary. The default behavior of the logger is to serialize to plain text, but platforms may want to look at the
4747
`/serializer/ansi` serializer instead for colored output.
4848

49-
### Boss Bars
49+
### Boss bars
5050

5151
Boss bars are logistically somewhat complicated. As one of the few holders of mutable state in the library, they have to re-sync any state changes to their viewers.
5252
In order to track viewers and link up to any internal state, the `BossBarImplementation.Provider` SPI allows platforms to provide their own implementation hooks per-bar.

0 commit comments

Comments
 (0)