diff --git a/package-lock.json b/package-lock.json index 2983ef422fdab7..933a287448c480 100644 --- a/package-lock.json +++ b/package-lock.json @@ -52,6 +52,7 @@ "fast-xml-parser": "5.2.0", "github-slugger": "2.0.0", "globals": "16.0.0", + "hast-util-heading-rank": "3.0.0", "hast-util-select": "6.0.4", "hastscript": "9.0.1", "he": "1.2.0", diff --git a/package.json b/package.json index 9feb59cc5556a0..118ee11ad05053 100644 --- a/package.json +++ b/package.json @@ -70,6 +70,7 @@ "fast-xml-parser": "5.2.0", "github-slugger": "2.0.0", "globals": "16.0.0", + "hast-util-heading-rank": "3.0.0", "hast-util-select": "6.0.4", "hastscript": "9.0.1", "he": "1.2.0", diff --git a/src/pages/changelog/index.astro b/src/pages/changelog/index.astro index 2c35fb7867d3ab..2d67d171e8e594 100644 --- a/src/pages/changelog/index.astro +++ b/src/pages/changelog/index.astro @@ -2,7 +2,6 @@ import StarlightPage, { type StarlightPageProps, } from "@astrojs/starlight/components/StarlightPage.astro"; -import { render } from "astro:content"; import Header from "~/components/changelog/Header.astro"; import ProductPills from "~/components/changelog/ProductPills.astro"; @@ -11,6 +10,10 @@ import { Steps } from "~/components"; import { format } from "date-fns"; import { getChangelogs } from "~/util/changelog"; import { productsByGroup } from "~/util/products"; +import { entryToString } from "~/util/container"; +import { process } from "~/util/rehype"; + +import rehypeShiftHeadings from "~/plugins/rehype/shift-headings.ts"; const notes = await getChangelogs({ filter: (entry) => !entry.data.hidden, @@ -42,7 +45,8 @@ const props = { .map((group) => group[0]) .sort(); - const { Content } = await render(entry); + const html = await entryToString(entry, Astro.locals); + const processed = await process(html, [[rehypeShiftHeadings]]); return (
-