The accessibility statement is read from the Stackyard repository at build time, and that - checkout was not available for this build. Read it on - GitHub.
`; +const parsed = raw + ? withHeadingIds(String(await marked.parse(absolutiseLinks(stripTitle(raw))))) + : { + html: `The accessibility statement is read from the Stackyard repository at build time, and + that checkout was not available for this build. Read it on + GitHub.
`, + headings: [], + }; +const { html, headings } = parsed; ---
This page is generated from
@@ -68,7 +80,7 @@ const earlier = released.slice(1);
{latest && (
ACCESSIBILITY.md in the Stackyard repository, so it
diff --git a/src/pages/docs/changelog.astro b/src/pages/docs/changelog.astro
index 46d7bc3..6bda8f2 100644
--- a/src/pages/docs/changelog.astro
+++ b/src/pages/docs/changelog.astro
@@ -1,7 +1,8 @@
---
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
import { marked } from 'marked';
-import { readRepoFile, stripTitle, absolutiseLinks } from '../../lib/repo';
+import { readRepoFile, stripTitle, absolutiseLinks, slugify } from '../../lib/repo';
+import type { Heading } from '../../lib/repo';
const REPO = 'https://github.com/SandObserver/stackyard';
const raw = readRepoFile('CHANGELOG.md');
@@ -12,6 +13,7 @@ type Section = {
meta: string;
body: string;
unreleased: boolean;
+ slug: string;
};
let intro = '';
@@ -35,6 +37,7 @@ if (raw) {
meta: dash ? dash[2] : '',
body,
unreleased: /unreleased/i.test(heading),
+ slug: `release-${slugify((dash ? dash[1] : heading).replace(/^\[|\]$/g, ''))}`,
});
}
} else {
@@ -45,14 +48,23 @@ const unreleased = sections.find((s) => s.unreleased) ?? null;
const released = sections.filter((s) => !s.unreleased);
const latest = released[0] ?? null;
const earlier = released.slice(1);
+
+const headings: Heading[] = failed
+ ? []
+ : [
+ ...(latest ? [{ depth: 2, slug: latest.slug, text: `${latest.label} (latest)` }] : []),
+ ...(unreleased ? [{ depth: 2, slug: 'unreleased', text: 'Unreleased' }] : []),
+ ...(earlier.length ? [{ depth: 2, slug: 'earlier-releases', text: 'Earlier releases' }] : []),
+ ...earlier.map((s) => ({ depth: 3, slug: s.slug, text: s.label })),
+ ];
---
+
{latest.label}
Latest release
{latest.meta && {latest.meta}}
@@ -78,7 +90,7 @@ const earlier = released.slice(1);
)}
{unreleased && (
-
Unreleased
Not in a published version yet
@@ -89,9 +101,9 @@ const earlier = released.slice(1);
{earlier.length > 0 && (
<>
-
Earlier releases
+ Earlier releases
{earlier.map((s) => (
-
{s.label}
{s.meta && {s.meta}}
@@ -106,3 +118,19 @@ const earlier = released.slice(1);
>
)}
The contributing guide is read from the Stackyard repository at build time, and that - checkout was not available for this build. Read it on - GitHub.
`; +const parsed = raw + ? withHeadingIds(String(await marked.parse(absolutiseLinks(stripTitle(raw))))) + : { + html: `The contributing guide is read from the Stackyard repository at build time, and that + checkout was not available for this build. Read it on + GitHub.
`, + headings: [], + }; +const { html, headings } = parsed; const reference = [ ['architecture.md', 'Architecture', 'How a request is served, and where config lives.'], @@ -25,6 +29,7 @@ const reference = [ title: 'Development', description: 'How to work on Stackyard, taken from the repository at build time.', }} + headings={[...headings, { depth: 2, slug: 'reference', text: 'Reference' }]} >
This page is generated from CONTRIBUTING.md in the Stackyard repository, so it
diff --git a/src/pages/index.astro b/src/pages/index.astro
index dd32e58..7b00134 100644
--- a/src/pages/index.astro
+++ b/src/pages/index.astro
@@ -1,5 +1,6 @@
---
import { readAppVersion } from '../lib/repo';
+import '../styles/fonts.css';
const version = readAppVersion();
@@ -54,11 +55,12 @@ const schema = {
-
-