From 98b32e08d810784ce02d49ffa983e4e6bb2fc21e Mon Sep 17 00:00:00 2001 From: Doc Date: Tue, 7 Apr 2026 10:55:08 -0400 Subject: [PATCH 01/17] feat: add support for tags --- src/content.config.ts | 1 + src/pages/news/tags/[tag].astro | 80 +++++++++++++++++++++++++++++++++ src/pages/news/tags/index.astro | 38 ++++++++++++++++ 3 files changed, 119 insertions(+) create mode 100644 src/pages/news/tags/[tag].astro create mode 100644 src/pages/news/tags/index.astro diff --git a/src/content.config.ts b/src/content.config.ts index bd52c3b3..2a7cb291 100644 --- a/src/content.config.ts +++ b/src/content.config.ts @@ -12,6 +12,7 @@ const posts = defineCollection({ date: z.coerce.date(), author: z.string().default(DEFAULT_AUTHOR), authorAvatar: z.url().default(DEFAULT_AVATAR), + tags: z.array(z.string()).default([]), cover: z .object({ src: z.url(), diff --git a/src/pages/news/tags/[tag].astro b/src/pages/news/tags/[tag].astro new file mode 100644 index 00000000..5cc03ce7 --- /dev/null +++ b/src/pages/news/tags/[tag].astro @@ -0,0 +1,80 @@ +--- +import Layout from "@/layouts/Layout.astro"; +import { getCollection } from "astro:content"; +import { countWords, minutesToRead, truncateForPreview } from "@/utils/content"; +import { formatDateLong } from "@/utils/time.ts"; +import { Icon } from "astro-icon/components"; + +export async function getStaticPaths() { + const allPosts = await getCollection("posts"); + + const uniqueTags = [...new Set(allPosts.map((post: any) => post.data.tags).flat())]; + return uniqueTags.map((tag) => { + const filteredPosts = allPosts.filter((post: any) => post.data.tags.includes(tag)); + const postsWithMeta = filteredPosts.map((p) => { + const words = countWords(p.body ?? ""); + const excerpt = truncateForPreview(p.body ?? "", 512); + return { + ...p, + words, + mins: minutesToRead(words), + excerpt, + }; + }); + return { + params: { tag }, + props: { posts: postsWithMeta }, + }; + }); +} +const { tag } = Astro.params; +const { posts } = Astro.props; +--- + + + + diff --git a/src/pages/news/tags/index.astro b/src/pages/news/tags/index.astro new file mode 100644 index 00000000..09e79b5d --- /dev/null +++ b/src/pages/news/tags/index.astro @@ -0,0 +1,38 @@ +--- +import Layout from "@/layouts/Layout.astro"; +import { getCollection } from "astro:content"; +const allPosts = await getCollection("posts"); +const tags = [...new Set(allPosts.map((post: any) => post.data.tags).flat())]; +--- + + +
+
+

News Tags

+
+
+ { + tags.map((tag) => ( + +
+
+
+

{tag}

+ + Latest + +
+
+
+
+ )) + } +
+
+
+ + From 6b06fc6c4ea04bd6633b378869e03ceda5dfdf8a Mon Sep 17 00:00:00 2001 From: Doc Date: Tue, 7 Apr 2026 10:57:02 -0400 Subject: [PATCH 02/17] feat: include tags in news index --- src/pages/news/index.astro | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/pages/news/index.astro b/src/pages/news/index.astro index 4eca137e..087d3e47 100644 --- a/src/pages/news/index.astro +++ b/src/pages/news/index.astro @@ -33,11 +33,21 @@ const postsWithMeta = posts.map((p) => {

{entry.data.title}

- {idx === 0 ? ( - - Latest - - ) : null} +
+ {entry.data.tags?.map((tag: string) => ( + + + {tag} + + + + ))} + {idx === 0 ? ( + + Latest + + ) : null} +
From 95beb3c9560cfa40db77582d3934046597d8189d Mon Sep 17 00:00:00 2001 From: Doc Date: Tue, 7 Apr 2026 10:57:17 -0400 Subject: [PATCH 03/17] feat: test a few tags in news --- src/content/posts/1-21-11.mdx | 3 +++ src/content/posts/1-21.mdx | 3 +++ src/content/posts/welcome-to-papermc.mdx | 2 ++ 3 files changed, 8 insertions(+) diff --git a/src/content/posts/1-21-11.mdx b/src/content/posts/1-21-11.mdx index e92ef7a7..5e330fdf 100644 --- a/src/content/posts/1-21-11.mdx +++ b/src/content/posts/1-21-11.mdx @@ -2,6 +2,9 @@ title: "1.21.11" date: "2025-12-21T20:00:00Z" author: "Paper Team" +tags: + - "updates" + - "paper" --- ## The 1.21.11 Update diff --git a/src/content/posts/1-21.mdx b/src/content/posts/1-21.mdx index 78bd4a8c..da989a67 100644 --- a/src/content/posts/1-21.mdx +++ b/src/content/posts/1-21.mdx @@ -2,6 +2,9 @@ title: "1.21" date: "2024-07-20T18:00:16.000Z" author: "Paper Team" +tags: + - "updates" + - "paper" --- ## The 1.21 Update diff --git a/src/content/posts/welcome-to-papermc.mdx b/src/content/posts/welcome-to-papermc.mdx index 1e162bd0..9d001f41 100644 --- a/src/content/posts/welcome-to-papermc.mdx +++ b/src/content/posts/welcome-to-papermc.mdx @@ -2,6 +2,8 @@ title: "Welcome to PaperMC" date: "2021-12-14T03:36:05.000Z" author: "Paper Team" +tags: + - "paperchan" --- Welcome to PaperMC! From 24ab85841cd01b9cb5b3ef167f6527bf02e95bdd Mon Sep 17 00:00:00 2001 From: Doc Date: Tue, 7 Apr 2026 15:24:39 -0400 Subject: [PATCH 04/17] style: format for news index.astro --- src/pages/news/index.astro | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/news/index.astro b/src/pages/news/index.astro index 087d3e47..6da33683 100644 --- a/src/pages/news/index.astro +++ b/src/pages/news/index.astro @@ -40,7 +40,6 @@ const postsWithMeta = posts.map((p) => { {tag} - ))} {idx === 0 ? ( From baa0d35a2251bf60468405c66b4ab9c472e4e514 Mon Sep 17 00:00:00 2001 From: Doc Date: Tue, 7 Apr 2026 15:31:06 -0400 Subject: [PATCH 05/17] feat: include tags in footer of the new/post --- src/pages/news/[id].astro | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/pages/news/[id].astro b/src/pages/news/[id].astro index 63cd0b29..37f9ddc4 100644 --- a/src/pages/news/[id].astro +++ b/src/pages/news/[id].astro @@ -21,7 +21,7 @@ const mins = minutesToRead(words); const excerpt = truncateForPreview(post.body ?? "", 120); --- - +
@@ -85,6 +85,21 @@ const excerpt = truncateForPreview(post.body ?? "", 120);
{post.data.cover.credit}
) } + + { + post.data.tags && post.data.tags.length > 0 && ( +
+ {post.data.tags.map((tag: string) => ( + + #{tag} + + ))} +
+ ) + }
From ef4aaec1af90555bf077d86c482904902aba5d87 Mon Sep 17 00:00:00 2001 From: Doc Date: Tue, 7 Apr 2026 15:39:22 -0400 Subject: [PATCH 06/17] feat: change position of tags --- src/pages/news/index.astro | 42 +++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/src/pages/news/index.astro b/src/pages/news/index.astro index 6da33683..2a6fbd62 100644 --- a/src/pages/news/index.astro +++ b/src/pages/news/index.astro @@ -34,13 +34,6 @@ const postsWithMeta = posts.map((p) => {

{entry.data.title}

- {entry.data.tags?.map((tag: string) => ( - - - {tag} - - - ))} {idx === 0 ? ( Latest @@ -50,18 +43,33 @@ const postsWithMeta = posts.map((p) => {
-
- - - {formatDateLong(new Date(entry.data.date))} - +
+
+ + + {formatDateLong(new Date(entry.data.date))} + + + - + + + {entry.mins} min read + +
- - - {entry.mins} min read - + {entry.data.tags && entry.data.tags.length > 0 && ( +
+ {entry.data.tags.map((tag: string) => ( + + {tag} + + ))} +
+ )}
From c0ead0960e3b2f76cca375820b2a50e3ab79a0af Mon Sep 17 00:00:00 2001 From: Doc Date: Tue, 7 Apr 2026 15:40:43 -0400 Subject: [PATCH 07/17] style: avoid big space for news in container --- src/pages/news/index.astro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/news/index.astro b/src/pages/news/index.astro index 2a6fbd62..624b1a1e 100644 --- a/src/pages/news/index.astro +++ b/src/pages/news/index.astro @@ -29,7 +29,7 @@ const postsWithMeta = posts.map((p) => { { postsWithMeta.map((entry, idx) => ( -
+

{entry.data.title}

From 1b759400d608c64d1a5801147297f0aedc4041ee Mon Sep 17 00:00:00 2001 From: Doc Date: Tue, 7 Apr 2026 15:45:26 -0400 Subject: [PATCH 08/17] feat: cleanup of design of tags index section --- src/pages/news/tags/index.astro | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/src/pages/news/tags/index.astro b/src/pages/news/tags/index.astro index 09e79b5d..d7c9bdaa 100644 --- a/src/pages/news/tags/index.astro +++ b/src/pages/news/tags/index.astro @@ -7,22 +7,19 @@ const tags = [...new Set(allPosts.map((post: any) => post.data.tags).flat())];
-
-

News Tags

+
+

Tag Index

-
+
{ - tags.map((tag) => ( - -
-
-
-

{tag}

- - Latest - -
-
+ tags.sort().map((tag) => ( +
+ #{tag} +
+ {allPosts.filter((post: any) => post.data.tags?.includes(tag)).length}
)) From 4c36ce68bb9e75256458b3916c78958bfcaa5ddc Mon Sep 17 00:00:00 2001 From: Doc Date: Thu, 23 Apr 2026 22:14:54 -0400 Subject: [PATCH 09/17] feat: change Tag to component --- src/components/news/Tag.astro | 46 +++++++++++++++++++++++++++++++++ src/pages/news/[id].astro | 8 ++---- src/pages/news/index.astro | 8 ++---- src/pages/news/tags/[tag].astro | 8 ++++-- 4 files changed, 56 insertions(+), 14 deletions(-) create mode 100644 src/components/news/Tag.astro diff --git a/src/components/news/Tag.astro b/src/components/news/Tag.astro new file mode 100644 index 00000000..3ceb8c56 --- /dev/null +++ b/src/components/news/Tag.astro @@ -0,0 +1,46 @@ +--- +interface Props { + name: string; + class?: string; +} + +const { name, class: className } = Astro.props; + +const DEFAULT_TAGS: Record = { + updates: "bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300 border-green-200 dark:border-green-800", + project: "bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300 border-amber-200 dark:border-amber-800", + announcement: "bg-rose-100 text-rose-800 dark:bg-rose-900/30 dark:text-rose-300 border-rose-200 dark:border-rose-800", +}; + +const getTagColor = (t: string) => { + const lowerTag = t.toLowerCase(); + const parts = lowerTag.split(/[ _:]/); + const prefix = parts[0]; + + return DEFAULT_TAGS[prefix] || DEFAULT_TAGS[lowerTag] || "bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300 border-gray-200 dark:border-gray-700"; +}; + +const colorClass = getTagColor(name); + +// Función para formatear el texto de la tag +const formatTag = (t: string) => { + // Si es project_paper -> Project Paper + // Si es updates -> Updates + return t + .split(/[ _:]/) + .filter(Boolean) + .map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()) + .join(' '); +}; +--- + +
+ {formatTag(name)} + diff --git a/src/pages/news/[id].astro b/src/pages/news/[id].astro index 37f9ddc4..307b7c1b 100644 --- a/src/pages/news/[id].astro +++ b/src/pages/news/[id].astro @@ -4,6 +4,7 @@ import { getCollection, render } from "astro:content"; import { formatDateLong } from "@/utils/time"; import { countWords, minutesToRead, truncateForPreview } from "@/utils/content"; import { components } from "@/mdx/components"; +import Tag from "@/components/news/Tag.astro"; export async function getStaticPaths() { const posts = await getCollection("posts"); @@ -90,12 +91,7 @@ const excerpt = truncateForPreview(post.body ?? "", 120); post.data.tags && post.data.tags.length > 0 && (
{post.data.tags.map((tag: string) => ( - - #{tag} - + ))}
) diff --git a/src/pages/news/index.astro b/src/pages/news/index.astro index 624b1a1e..69fb9490 100644 --- a/src/pages/news/index.astro +++ b/src/pages/news/index.astro @@ -4,6 +4,7 @@ import { getCollection } from "astro:content"; import { formatDateLong } from "@/utils/time"; import { countWords, minutesToRead, truncateForPreview } from "@/utils/content"; import { Icon } from "astro-icon/components"; +import Tag from "@/components/news/Tag.astro"; import IconButton from "@/components/IconButton.astro"; const posts = (await getCollection("posts")).sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf()); @@ -61,12 +62,7 @@ const postsWithMeta = posts.map((p) => { {entry.data.tags && entry.data.tags.length > 0 && (
{entry.data.tags.map((tag: string) => ( - - {tag} - + ))}
)} diff --git a/src/pages/news/tags/[tag].astro b/src/pages/news/tags/[tag].astro index 5cc03ce7..11998514 100644 --- a/src/pages/news/tags/[tag].astro +++ b/src/pages/news/tags/[tag].astro @@ -4,6 +4,7 @@ import { getCollection } from "astro:content"; import { countWords, minutesToRead, truncateForPreview } from "@/utils/content"; import { formatDateLong } from "@/utils/time.ts"; import { Icon } from "astro-icon/components"; +import Tag from "@/components/news/Tag.astro"; export async function getStaticPaths() { const allPosts = await getCollection("posts"); @@ -33,8 +34,11 @@ const { posts } = Astro.props;
-
-

Posts with tag: {tag}

+
+ < Back to news index +

+ Posts with tag: +

{ From eb5f3132337232e4595ac508b0ba48c1c447419a Mon Sep 17 00:00:00 2001 From: Doc Date: Thu, 23 Apr 2026 22:17:19 -0400 Subject: [PATCH 10/17] feat: update tags in posts --- src/content/posts/1-21-11.mdx | 2 +- src/content/posts/1-21-3.mdx | 3 +++ src/content/posts/1-21-7.mdx | 3 +++ src/content/posts/1-21-9-and-10.mdx | 3 +++ src/content/posts/1-21.mdx | 2 +- src/content/posts/announcing-the-end-of-life-of-waterfall.mdx | 3 +++ ...portant-dev-psa-future-removal-of-cb-package-relocation.mdx | 2 ++ src/content/posts/paper-1-18-2.mdx | 3 +++ src/content/posts/paper-1-18-and-more.mdx | 3 +++ src/content/posts/paper-1-19-1.mdx | 3 +++ src/content/posts/paper-1-19.mdx | 3 +++ src/content/posts/paper-velocity-1-19-3.mdx | 3 +++ src/content/posts/paper-velocity-1-19-4.mdx | 3 +++ src/content/posts/paper-velocity-1-20-1.mdx | 3 +++ src/content/posts/paper-velocity-1-20-2.mdx | 3 +++ src/content/posts/paper-velocity-1-20-4.mdx | 3 +++ src/content/posts/paper-velocity-1-20-6.mdx | 3 +++ src/content/posts/the-future-of-paper-hard-fork.mdx | 3 +++ src/content/posts/welcome-to-papermc.mdx | 2 -- 19 files changed, 49 insertions(+), 4 deletions(-) diff --git a/src/content/posts/1-21-11.mdx b/src/content/posts/1-21-11.mdx index 5e330fdf..50ac340e 100644 --- a/src/content/posts/1-21-11.mdx +++ b/src/content/posts/1-21-11.mdx @@ -3,8 +3,8 @@ title: "1.21.11" date: "2025-12-21T20:00:00Z" author: "Paper Team" tags: + - "project: paper" - "updates" - - "paper" --- ## The 1.21.11 Update diff --git a/src/content/posts/1-21-3.mdx b/src/content/posts/1-21-3.mdx index c0e05d85..766150b7 100644 --- a/src/content/posts/1-21-3.mdx +++ b/src/content/posts/1-21-3.mdx @@ -2,6 +2,9 @@ title: "1.21.3" date: "2024-11-24T17:45:00.000Z" author: "Paper Team" +tags: + - "project: paper" + - "updates" --- ## The 1.21.3 Update diff --git a/src/content/posts/1-21-7.mdx b/src/content/posts/1-21-7.mdx index cdfc8b81..7f1516f2 100644 --- a/src/content/posts/1-21-7.mdx +++ b/src/content/posts/1-21-7.mdx @@ -2,6 +2,9 @@ title: "1.21.7" date: "2025-06-30T14:00:00.000Z" author: "Paper Team" +tags: + - "project: paper" + - "updates" --- ## The 1.21.5 / 1.21.6 / 1.21.7 Update diff --git a/src/content/posts/1-21-9-and-10.mdx b/src/content/posts/1-21-9-and-10.mdx index 988f0ec7..40dd113d 100644 --- a/src/content/posts/1-21-9-and-10.mdx +++ b/src/content/posts/1-21-9-and-10.mdx @@ -2,6 +2,9 @@ title: "1.21.9 & 1.21.10" date: "2025-10-25T19:31:42Z" author: "Paper Team" +tags: + - "project: paper" + - "updates" --- ## The 1.21.9/10 Update diff --git a/src/content/posts/1-21.mdx b/src/content/posts/1-21.mdx index da989a67..7579c496 100644 --- a/src/content/posts/1-21.mdx +++ b/src/content/posts/1-21.mdx @@ -3,8 +3,8 @@ title: "1.21" date: "2024-07-20T18:00:16.000Z" author: "Paper Team" tags: + - "project: paper" - "updates" - - "paper" --- ## The 1.21 Update diff --git a/src/content/posts/announcing-the-end-of-life-of-waterfall.mdx b/src/content/posts/announcing-the-end-of-life-of-waterfall.mdx index b675ba41..54cec563 100644 --- a/src/content/posts/announcing-the-end-of-life-of-waterfall.mdx +++ b/src/content/posts/announcing-the-end-of-life-of-waterfall.mdx @@ -2,6 +2,9 @@ title: "Announcing the end of life of Waterfall" date: "2024-03-26T16:30:42.000Z" author: "Paper Team" +tags: + - "project: waterfall" + - "announcement" --- # Announcing the end of life of Waterfall diff --git a/src/content/posts/important-dev-psa-future-removal-of-cb-package-relocation.mdx b/src/content/posts/important-dev-psa-future-removal-of-cb-package-relocation.mdx index 705f4f73..ba02be22 100644 --- a/src/content/posts/important-dev-psa-future-removal-of-cb-package-relocation.mdx +++ b/src/content/posts/important-dev-psa-future-removal-of-cb-package-relocation.mdx @@ -2,6 +2,8 @@ title: "Important dev PSA: Future removal of CB package relocation" date: "2024-03-22T11:00:00.000Z" author: "Paper Team" +tags: + - "project: paper" --- ## Future removal of CB package relocation + moving away from obfuscation at runtime diff --git a/src/content/posts/paper-1-18-2.mdx b/src/content/posts/paper-1-18-2.mdx index d667d3c1..48e8793a 100644 --- a/src/content/posts/paper-1-18-2.mdx +++ b/src/content/posts/paper-1-18-2.mdx @@ -2,6 +2,9 @@ title: "Paper 1.18.2" date: "2022-03-04T18:04:37.000Z" author: "Paper Team" +tags: + - "project: paper" + - "updates" --- ## The 1.18.2 Update diff --git a/src/content/posts/paper-1-18-and-more.mdx b/src/content/posts/paper-1-18-and-more.mdx index 48ace23a..c69d8e02 100644 --- a/src/content/posts/paper-1-18-and-more.mdx +++ b/src/content/posts/paper-1-18-and-more.mdx @@ -2,6 +2,9 @@ title: "Paper 1.18 and more" date: "2022-01-04T20:46:50.000Z" author: "Paper Team" +tags: + - "project: paper" + - "updates" --- ## The 1.18 update diff --git a/src/content/posts/paper-1-19-1.mdx b/src/content/posts/paper-1-19-1.mdx index 3e471b4b..f8b751bd 100644 --- a/src/content/posts/paper-1-19-1.mdx +++ b/src/content/posts/paper-1-19-1.mdx @@ -2,6 +2,9 @@ title: "Paper 1.19.1" date: "2022-07-30T00:43:40.000Z" author: "Paper Team" +tags: + - "project: paper" + - "updates" --- ## The 1.19.1 Update diff --git a/src/content/posts/paper-1-19.mdx b/src/content/posts/paper-1-19.mdx index 8789edcb..0cc0181e 100644 --- a/src/content/posts/paper-1-19.mdx +++ b/src/content/posts/paper-1-19.mdx @@ -2,6 +2,9 @@ title: "Paper 1.19" date: "2022-06-12T16:34:45.000Z" author: "Paper Team" +tags: + - "project: paper" + - "updates" --- ## The 1.19 Update diff --git a/src/content/posts/paper-velocity-1-19-3.mdx b/src/content/posts/paper-velocity-1-19-3.mdx index 74275a1c..d0282dc3 100644 --- a/src/content/posts/paper-velocity-1-19-3.mdx +++ b/src/content/posts/paper-velocity-1-19-3.mdx @@ -2,6 +2,9 @@ title: "Paper & Velocity 1.19.3" date: "2022-12-11T17:00:00.000Z" author: "Paper Team" +tags: + - "project: velocity" + - "updates" --- ## The 1.19.3 Update diff --git a/src/content/posts/paper-velocity-1-19-4.mdx b/src/content/posts/paper-velocity-1-19-4.mdx index db3c932f..3c8f1791 100644 --- a/src/content/posts/paper-velocity-1-19-4.mdx +++ b/src/content/posts/paper-velocity-1-19-4.mdx @@ -2,6 +2,9 @@ title: "Paper & Velocity 1.19.4" date: "2023-03-19T17:00:00.000Z" author: "Paper Team" +tags: + - "project: velocity" + - "updates" --- ## The 1.19.4 Update diff --git a/src/content/posts/paper-velocity-1-20-1.mdx b/src/content/posts/paper-velocity-1-20-1.mdx index 24897f10..9e3c1f8b 100644 --- a/src/content/posts/paper-velocity-1-20-1.mdx +++ b/src/content/posts/paper-velocity-1-20-1.mdx @@ -2,6 +2,9 @@ title: "Paper & Velocity 1.20(.1)" date: "2023-06-11T18:00:00.000Z" author: "Paper Team" +tags: + - "project: velocity" + - "updates" --- ## The 1.20(.1) Update diff --git a/src/content/posts/paper-velocity-1-20-2.mdx b/src/content/posts/paper-velocity-1-20-2.mdx index 0afc6f99..8631f151 100644 --- a/src/content/posts/paper-velocity-1-20-2.mdx +++ b/src/content/posts/paper-velocity-1-20-2.mdx @@ -2,6 +2,9 @@ title: "Paper & Velocity 1.20.2" date: "2023-10-10T10:00:00.000Z" author: "Paper Team" +tags: + - "project: velocity" + - "updates" --- ## The 1.20.2 Update diff --git a/src/content/posts/paper-velocity-1-20-4.mdx b/src/content/posts/paper-velocity-1-20-4.mdx index f8d99a0d..da7c69ef 100644 --- a/src/content/posts/paper-velocity-1-20-4.mdx +++ b/src/content/posts/paper-velocity-1-20-4.mdx @@ -2,6 +2,9 @@ title: "Paper & Velocity 1.20.4" date: "2023-12-25T11:00:00.000Z" author: "Paper Team" +tags: + - "project: velocity" + - "updates" --- ## The 1.20.4 Update diff --git a/src/content/posts/paper-velocity-1-20-6.mdx b/src/content/posts/paper-velocity-1-20-6.mdx index 2a9ff6b7..2a68847f 100644 --- a/src/content/posts/paper-velocity-1-20-6.mdx +++ b/src/content/posts/paper-velocity-1-20-6.mdx @@ -2,6 +2,9 @@ title: "Paper & Velocity 1.20.6" date: "2024-05-28T15:00:00.000Z" author: "Paper Team" +tags: + - "project: velocity" + - "updates" --- ## The 1.20.5/6 Update diff --git a/src/content/posts/the-future-of-paper-hard-fork.mdx b/src/content/posts/the-future-of-paper-hard-fork.mdx index 435d813c..db5ce0d4 100644 --- a/src/content/posts/the-future-of-paper-hard-fork.mdx +++ b/src/content/posts/the-future-of-paper-hard-fork.mdx @@ -2,6 +2,9 @@ title: "The future of Paper - Hard fork" date: "2024-12-13T10:00:00.000Z" author: "Paper Team" +tags: + - "project: paper" + - "announcement" --- After the release of the first builds for Minecraft 1.21.4, we are happy to share some even more exciting news with everyone. Following the successful rollout of our Mojang-mapped server in 1.20.5, we are taking a big next step for the project: diff --git a/src/content/posts/welcome-to-papermc.mdx b/src/content/posts/welcome-to-papermc.mdx index 9d001f41..1e162bd0 100644 --- a/src/content/posts/welcome-to-papermc.mdx +++ b/src/content/posts/welcome-to-papermc.mdx @@ -2,8 +2,6 @@ title: "Welcome to PaperMC" date: "2021-12-14T03:36:05.000Z" author: "Paper Team" -tags: - - "paperchan" --- Welcome to PaperMC! From b270e775ac9ffbf93daedaab1c0f36011aee37e4 Mon Sep 17 00:00:00 2001 From: Doc Date: Thu, 23 Apr 2026 22:18:46 -0400 Subject: [PATCH 11/17] style: format Tag.astro --- src/components/news/Tag.astro | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/components/news/Tag.astro b/src/components/news/Tag.astro index 3ceb8c56..2e1d0b22 100644 --- a/src/components/news/Tag.astro +++ b/src/components/news/Tag.astro @@ -17,7 +17,11 @@ const getTagColor = (t: string) => { const parts = lowerTag.split(/[ _:]/); const prefix = parts[0]; - return DEFAULT_TAGS[prefix] || DEFAULT_TAGS[lowerTag] || "bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300 border-gray-200 dark:border-gray-700"; + return ( + DEFAULT_TAGS[prefix] || + DEFAULT_TAGS[lowerTag] || + "bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300 border-gray-200 dark:border-gray-700" + ); }; const colorClass = getTagColor(name); @@ -29,17 +33,17 @@ const formatTag = (t: string) => { return t .split(/[ _:]/) .filter(Boolean) - .map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()) - .join(' '); + .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()) + .join(" "); }; --- {formatTag(name)} From ba343aa766086c32ef537adb64420b3fa0c94e84 Mon Sep 17 00:00:00 2001 From: Doc Date: Thu, 23 Apr 2026 22:35:06 -0400 Subject: [PATCH 12/17] feat: update tag margin and increment post limit preview --- src/components/news/Tag.astro | 4 +--- src/pages/news/index.astro | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/components/news/Tag.astro b/src/components/news/Tag.astro index 2e1d0b22..c609b336 100644 --- a/src/components/news/Tag.astro +++ b/src/components/news/Tag.astro @@ -44,7 +44,5 @@ const formatTag = (t: string) => { "inline-flex items-center rounded-full border px-2.5 py-0.5 align-middle text-[10px] font-medium tracking-wider uppercase transition-colors", colorClass, className, - ]} + ]}>{formatTag(name)} - {formatTag(name)} - diff --git a/src/pages/news/index.astro b/src/pages/news/index.astro index 69fb9490..d778e20b 100644 --- a/src/pages/news/index.astro +++ b/src/pages/news/index.astro @@ -5,13 +5,12 @@ import { formatDateLong } from "@/utils/time"; import { countWords, minutesToRead, truncateForPreview } from "@/utils/content"; import { Icon } from "astro-icon/components"; import Tag from "@/components/news/Tag.astro"; -import IconButton from "@/components/IconButton.astro"; const posts = (await getCollection("posts")).sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf()); const postsWithMeta = posts.map((p) => { const words = countWords(p.body ?? ""); - const excerpt = truncateForPreview(p.body ?? "", 512); + const excerpt = truncateForPreview(p.body ?? "", 700); return { ...p, words, @@ -60,7 +59,7 @@ const postsWithMeta = posts.map((p) => {
{entry.data.tags && entry.data.tags.length > 0 && ( -
+
{entry.data.tags.map((tag: string) => ( ))} From 0e26232f4d2ae0c2f5b34b45fbd319d3b81e1ba8 Mon Sep 17 00:00:00 2001 From: Doc Date: Fri, 24 Apr 2026 08:43:08 -0400 Subject: [PATCH 13/17] style: cleanup Tag.astro --- src/components/news/Tag.astro | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/components/news/Tag.astro b/src/components/news/Tag.astro index c609b336..51bdd2a7 100644 --- a/src/components/news/Tag.astro +++ b/src/components/news/Tag.astro @@ -7,8 +7,8 @@ interface Props { const { name, class: className } = Astro.props; const DEFAULT_TAGS: Record = { - updates: "bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300 border-green-200 dark:border-green-800", project: "bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300 border-amber-200 dark:border-amber-800", + updates: "bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300 border-green-200 dark:border-green-800", announcement: "bg-rose-100 text-rose-800 dark:bg-rose-900/30 dark:text-rose-300 border-rose-200 dark:border-rose-800", }; @@ -26,10 +26,7 @@ const getTagColor = (t: string) => { const colorClass = getTagColor(name); -// Función para formatear el texto de la tag const formatTag = (t: string) => { - // Si es project_paper -> Project Paper - // Si es updates -> Updates return t .split(/[ _:]/) .filter(Boolean) From 4ef4a0f3740d8219f0d95d3c874ed22d0a5526fc Mon Sep 17 00:00:00 2001 From: Doc Date: Fri, 24 Apr 2026 08:50:58 -0400 Subject: [PATCH 14/17] feat: update tag display for news --- src/pages/news/[id].astro | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/news/[id].astro b/src/pages/news/[id].astro index 307b7c1b..c2c4c1ce 100644 --- a/src/pages/news/[id].astro +++ b/src/pages/news/[id].astro @@ -89,7 +89,8 @@ const excerpt = truncateForPreview(post.body ?? "", 120); { post.data.tags && post.data.tags.length > 0 && ( -
+
+ Tags: {post.data.tags.map((tag: string) => ( ))} From 84efc6725695a81dd78cab7ad5956b3173c056e3 Mon Sep 17 00:00:00 2001 From: Doc Date: Fri, 24 Apr 2026 08:55:42 -0400 Subject: [PATCH 15/17] feat: move tag to head in news --- src/pages/news/[id].astro | 52 ++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/src/pages/news/[id].astro b/src/pages/news/[id].astro index c2c4c1ce..ed582031 100644 --- a/src/pages/news/[id].astro +++ b/src/pages/news/[id].astro @@ -55,23 +55,36 @@ const excerpt = truncateForPreview(post.body ?? "", 120); {words} words
-
+
+
+ { + post.data.authorAvatar && ( + + ) + } +
+ {post.data.author} +
+
+ { - post.data.authorAvatar && ( - + post.data.tags && post.data.tags.length > 0 && ( +
+ Tags: + {post.data.tags.map((tag: string) => ( + + ))} +
) } -
- {post.data.author} -
@@ -86,17 +99,6 @@ const excerpt = truncateForPreview(post.body ?? "", 120);
{post.data.cover.credit}
) } - - { - post.data.tags && post.data.tags.length > 0 && ( -
- Tags: - {post.data.tags.map((tag: string) => ( - - ))} -
- ) - }
From 1a6d9ddd54ce742bbc37aafd2421846b579431f3 Mon Sep 17 00:00:00 2001 From: Doc Date: Fri, 24 Apr 2026 09:10:04 -0400 Subject: [PATCH 16/17] feat: improvement the tag search display --- .../news/tags/{[tag].astro => [tagName].astro} | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename src/pages/news/tags/{[tag].astro => [tagName].astro} (86%) diff --git a/src/pages/news/tags/[tag].astro b/src/pages/news/tags/[tagName].astro similarity index 86% rename from src/pages/news/tags/[tag].astro rename to src/pages/news/tags/[tagName].astro index 11998514..5a6a464e 100644 --- a/src/pages/news/tags/[tag].astro +++ b/src/pages/news/tags/[tagName].astro @@ -10,11 +10,11 @@ export async function getStaticPaths() { const allPosts = await getCollection("posts"); const uniqueTags = [...new Set(allPosts.map((post: any) => post.data.tags).flat())]; - return uniqueTags.map((tag) => { - const filteredPosts = allPosts.filter((post: any) => post.data.tags.includes(tag)); + return uniqueTags.map((uniqueTag) => { + const filteredPosts = allPosts.filter((post: any) => post.data.tags.includes(uniqueTag)); const postsWithMeta = filteredPosts.map((p) => { const words = countWords(p.body ?? ""); - const excerpt = truncateForPreview(p.body ?? "", 512); + const excerpt = truncateForPreview(p.body ?? "", 700); return { ...p, words, @@ -23,21 +23,21 @@ export async function getStaticPaths() { }; }); return { - params: { tag }, + params: { tagName: uniqueTag }, props: { posts: postsWithMeta }, }; }); } -const { tag } = Astro.params; +const { tagName } = Astro.params; const { posts } = Astro.props; --- - +
< Back to news index -

- Posts with tag: +

+ Posts with tag:

From 03673310510b77e0d2528daeebe2b6ab3478843a Mon Sep 17 00:00:00 2001 From: Doc Date: Mon, 27 Apr 2026 08:33:01 -0400 Subject: [PATCH 17/17] feat: add tags to 26-1 post --- src/content/posts/26-1.mdx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/content/posts/26-1.mdx b/src/content/posts/26-1.mdx index 06d3fd37..f7155a46 100644 --- a/src/content/posts/26-1.mdx +++ b/src/content/posts/26-1.mdx @@ -2,6 +2,9 @@ title: "26.1" date: "2026-04-26T20:00:00Z" author: "Paper Team" +tags: + - "project: paper" + - "updates" --- ## The 26.1 Update