Skip to content

Commit c675ee8

Browse files
committed
chore: allow beta versions as latest, remove versioned JD links
1 parent e9ec614 commit c675ee8

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

astro.config.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,20 @@ export default defineConfig({
4141
title: "PaperMC Docs",
4242
social: [
4343
{ icon: "github", label: "paper:GitHub", href: "https://github.com/PaperMC/Paper" },
44-
{ icon: "seti:java", label: "paper:Javadoc", href: `https://jd.papermc.io/paper/${LATEST_PAPER_RELEASE}` },
44+
{ icon: "seti:java", label: "paper:Javadoc", href: `https://jd.papermc.io/paper` },
4545

4646
{ icon: "github", label: "velocity:GitHub", href: "https://github.com/PaperMC/Velocity" },
4747
{
4848
icon: "seti:java",
4949
label: "velocity:Javadoc",
50-
href: `https://jd.papermc.io/velocity/${LATEST_VELOCITY_RELEASE.substring(0, LATEST_VELOCITY_RELEASE.lastIndexOf("."))}.0`,
50+
href: `https://jd.papermc.io/velocity`,
5151
},
5252

5353
{ icon: "github", label: "folia:GitHub", href: "https://github.com/PaperMC/Folia" },
5454
{
5555
icon: "seti:java",
5656
label: "folia:Javadoc",
57-
href: `https://jd.papermc.io/folia/${LATEST_FOLIA_RELEASE.split(".").slice(0, 2).join(".")}`,
57+
href: `https://jd.papermc.io/folia`,
5858
},
5959

6060
{ icon: "github", label: "adventure:GitHub", href: "https://github.com/PaperMC/adventure" },
@@ -64,7 +64,7 @@ export default defineConfig({
6464
{
6565
icon: "seti:java",
6666
label: "waterfall:Javadoc",
67-
href: `https://jd.papermc.io/waterfall/${LATEST_WATERFALL_RELEASE}`,
67+
href: `https://jd.papermc.io/waterfall`,
6868
},
6969

7070
{ icon: "github", label: "GitHub", href: "https://github.com/PaperMC" },
@@ -547,9 +547,9 @@ export default defineConfig({
547547
javadocPlugin,
548548
{
549549
targets: {
550-
paper: `https://jd.papermc.io/paper/${LATEST_PAPER_RELEASE}`,
551-
velocity: `https://jd.papermc.io/velocity/${LATEST_VELOCITY_RELEASE.substring(0, LATEST_VELOCITY_RELEASE.lastIndexOf("."))}.0`,
552-
java: { url: "https://docs.oracle.com/en/java/javase/21/docs/api", module: "java.base" },
550+
paper: "https://jd.papermc.io/paper",
551+
velocity: "https://jd.papermc.io/velocity",
552+
java: { url: "https://docs.oracle.com/en/java/javase/25/docs/api", module: "java.base" },
553553
},
554554
},
555555
],

src/utils/versions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ const fetchBuilds = async ({ project }: Project, version: string): Promise<Build
5353
const findLatest = async (project: Project): Promise<string> => {
5454
const versions = Object.values(project.versions).flat();
5555

56-
// find the newest version with at least one stable build
56+
// find the newest version with at least one non-alpha build
5757
for (const version of versions) {
5858
const builds = await fetchBuilds(project, version);
59-
if (builds.some((b) => b.channel === "STABLE")) {
59+
if (builds.some((b) => b.channel !== "ALPHA")) {
6060
return version;
6161
}
6262
}

0 commit comments

Comments
 (0)