|
1 | 1 | import starlight from "@astrojs/starlight"; |
2 | 2 | import svelte from "@astrojs/svelte"; |
3 | | -import { pluginCollapsibleSections } from "@expressive-code/plugin-collapsible-sections"; |
4 | | -import { pluginLineNumbers } from "@expressive-code/plugin-line-numbers"; |
5 | 3 | import d2 from "astro-d2"; |
6 | 4 | import { defineConfig } from "astro/config"; |
7 | 5 | import starlightLinksValidator from "starlight-links-validator"; |
8 | 6 | import starlightSidebarTopics from "starlight-sidebar-topics"; |
9 | 7 | import codeConstantsPlugin from "./src/utils/remark/code_const"; |
10 | 8 | import javadocPlugin from "./src/utils/remark/javadoc"; |
11 | 9 | import { |
| 10 | + LATEST_ADVENTURE_API_RELEASE, |
| 11 | + LATEST_ADVENTURE_PLATFORM_MOD_RELEASE, |
| 12 | + LATEST_ADVENTURE_PLATFORM_RELEASE, |
| 13 | + LATEST_ADVENTURE_SUPPORTED_MC, |
| 14 | + LATEST_ADVENTURE_SUPPORTED_MC_RANGE, |
| 15 | + LATEST_ANSI_RELEASE, |
12 | 16 | LATEST_FOLIA_RELEASE, |
13 | 17 | LATEST_MC_RELEASE, |
14 | 18 | LATEST_PAPER_RELEASE, |
@@ -53,6 +57,9 @@ export default defineConfig({ |
53 | 57 | href: `https://jd.papermc.io/folia/${LATEST_FOLIA_RELEASE.split(".").slice(0, 2).join(".")}`, |
54 | 58 | }, |
55 | 59 |
|
| 60 | + { icon: "github", label: "adventure:GitHub", href: "https://github.com/KyoriPowered/adventure" }, |
| 61 | + { icon: "seti:java", label: "adventure:Javadoc", href: "https://jd.advntr.dev" }, |
| 62 | + |
56 | 63 | { icon: "github", label: "waterfall:GitHub", href: "https://github.com/PaperMC/Waterfall" }, |
57 | 64 | { |
58 | 65 | icon: "seti:java", |
@@ -91,6 +98,9 @@ export default defineConfig({ |
91 | 98 | }, |
92 | 99 | plugins: [ |
93 | 100 | starlightLinksValidator({ |
| 101 | + exclude: [ |
| 102 | + "/adventure/version-history/*", // custom pages |
| 103 | + ], |
94 | 104 | errorOnInvalidHashes: false, // enable if you want to check hashes - it doesn't work with config diagrams |
95 | 105 | }), |
96 | 106 | starlightSidebarTopics( |
@@ -358,19 +368,98 @@ export default defineConfig({ |
358 | 368 | }, |
359 | 369 | ], |
360 | 370 | }, |
| 371 | + { |
| 372 | + id: "adventure", |
| 373 | + label: "Adventure", |
| 374 | + link: "/adventure/", |
| 375 | + icon: "adventure", |
| 376 | + items: [ |
| 377 | + "adventure/getting-started", |
| 378 | + "adventure/community-libraries", |
| 379 | + "adventure/faq", |
| 380 | + "adventure/audiences", |
| 381 | + "adventure/text", |
| 382 | + { |
| 383 | + label: "Text serializers", |
| 384 | + items: [ |
| 385 | + "adventure/serializer", |
| 386 | + "adventure/serializer/json", |
| 387 | + "adventure/serializer/gson", |
| 388 | + "adventure/serializer/legacy", |
| 389 | + "adventure/serializer/plain", |
| 390 | + { |
| 391 | + label: "MiniMessage", |
| 392 | + items: [ |
| 393 | + "adventure/minimessage", |
| 394 | + "adventure/minimessage/format", |
| 395 | + "adventure/minimessage/api", |
| 396 | + "adventure/minimessage/dynamic-replacements", |
| 397 | + "adventure/minimessage/translator", |
| 398 | + ], |
| 399 | + }, |
| 400 | + "adventure/serializer/ansi", |
| 401 | + ], |
| 402 | + }, |
| 403 | + "adventure/bossbar", |
| 404 | + "adventure/sound", |
| 405 | + "adventure/titles", |
| 406 | + "adventure/book", |
| 407 | + "adventure/tablist", |
| 408 | + "adventure/resource-pack", |
| 409 | + { |
| 410 | + label: "MiniMessage", |
| 411 | + items: [ |
| 412 | + "adventure/minimessage", |
| 413 | + "adventure/minimessage/format", |
| 414 | + "adventure/minimessage/api", |
| 415 | + "adventure/minimessage/dynamic-replacements", |
| 416 | + "adventure/minimessage/translator", |
| 417 | + ], |
| 418 | + }, |
| 419 | + "adventure/localization", |
| 420 | + { |
| 421 | + label: "Platforms", |
| 422 | + items: [ |
| 423 | + "adventure/platform", |
| 424 | + "adventure/platform/native", |
| 425 | + "adventure/platform/bukkit", |
| 426 | + "adventure/platform/bungeecord", |
| 427 | + "adventure/platform/spongeapi", |
| 428 | + "adventure/platform/modded", |
| 429 | + "adventure/platform/fabric", |
| 430 | + "adventure/platform/neoforge", |
| 431 | + "adventure/platform/viaversion", |
| 432 | + "adventure/platform/implementing", |
| 433 | + ], |
| 434 | + }, |
| 435 | + { |
| 436 | + label: "Version history", |
| 437 | + items: [ |
| 438 | + { label: "adventure", link: "/adventure/version-history/adventure" }, |
| 439 | + { label: "adventure-platform", link: "/adventure/version-history/adventure-platform" }, |
| 440 | + { |
| 441 | + label: "adventure-platform-mod", |
| 442 | + link: "/adventure/version-history/adventure-platform-mod", |
| 443 | + }, |
| 444 | + ], |
| 445 | + }, |
| 446 | + { |
| 447 | + label: "Migrating to Adventure from other APIs", |
| 448 | + items: [ |
| 449 | + "adventure/migration", |
| 450 | + "adventure/migration/bungeecord-chat-api", |
| 451 | + "adventure/migration/text-3.x", |
| 452 | + ], |
| 453 | + }, |
| 454 | + ], |
| 455 | + }, |
361 | 456 | { |
362 | 457 | id: "waterfall", |
363 | 458 | label: "Waterfall", |
364 | 459 | link: "/waterfall/", |
365 | 460 | icon: "waterfall", |
366 | 461 | items: ["waterfall/getting-started", "waterfall/configuration"], |
367 | 462 | }, |
368 | | - { |
369 | | - id: "adventure", |
370 | | - label: "Adventure", |
371 | | - link: "https://docs.advntr.dev/", |
372 | | - icon: "adventure", |
373 | | - }, |
374 | 463 | { |
375 | 464 | id: "misc", |
376 | 465 | label: "Miscellaneous", |
@@ -429,23 +518,13 @@ export default defineConfig({ |
429 | 518 | "/velocity/dev/api", |
430 | 519 | ], |
431 | 520 | folia: ["/folia/admin", "/folia/admin/reference"], |
| 521 | + adventure: ["/adventure/version-history"], |
432 | 522 | waterfall: ["/waterfall"], |
433 | 523 | misc: ["/misc", "/misc/tools"], |
434 | 524 | }, |
435 | 525 | } |
436 | 526 | ), |
437 | 527 | ], |
438 | | - expressiveCode: { |
439 | | - plugins: [pluginLineNumbers(), pluginCollapsibleSections()], |
440 | | - defaultProps: { |
441 | | - showLineNumbers: false, |
442 | | - collapseStyle: "collapsible-start", |
443 | | - }, |
444 | | - frames: { |
445 | | - extractFileNameFromCode: false, |
446 | | - }, |
447 | | - emitExternalStylesheet: false, |
448 | | - }, |
449 | 528 | }), |
450 | 529 | svelte(), |
451 | 530 | d2({ |
@@ -482,6 +561,12 @@ export default defineConfig({ |
482 | 561 | LATEST_FOLIA_RELEASE, |
483 | 562 | LATEST_WATERFALL_RELEASE, |
484 | 563 | LATEST_USERDEV_RELEASE, |
| 564 | + LATEST_ADVENTURE_SUPPORTED_MC, |
| 565 | + LATEST_ADVENTURE_SUPPORTED_MC_RANGE, |
| 566 | + LATEST_ADVENTURE_API_RELEASE, |
| 567 | + LATEST_ADVENTURE_PLATFORM_RELEASE, |
| 568 | + LATEST_ADVENTURE_PLATFORM_MOD_RELEASE, |
| 569 | + LATEST_ANSI_RELEASE, |
485 | 570 | }, |
486 | 571 | }, |
487 | 572 | ], |
|
0 commit comments