{e.title}
+{e.summary}
+-
+ {e.bullets.map((b) => (
+
- {b} + ))} +
$ {e.code}
+ )}
+
+ From 151fd00e3708031a1e4b79bb786e8adede88e5f3 Mon Sep 17 00:00:00 2001
From: Dawn Parzych
+ Everything we shipped to Code Push, the CLI, and the API. Expand an entry
+ for the full detail, the command, and the doc it belongs to.
+ {e.summary}
+ Nothing matches that search — clear the field or pick a different area.
+ {group.label}
+ {group.items.map((e) => {
+ const searchText = `${e.title} ${e.summary} ${e.area} ${e.type}`.toLowerCase();
+ return (
+ {e.title}
+
+ {e.bullets.map((b) => (
+
+ {e.code && (
+
+ )}
+ $ {e.code}
{e.summary}
+ + {e.type} + + {e.area} + {e.version} + + + + +{e.summary}
+$ {e.code}
+
+ $ {e.code}
+
)}
- $ {e.code}
-
+ $ {e.code}
)}
diff --git a/src/pages/changelog.md.ts b/src/pages/changelog.md.ts
new file mode 100644
index 00000000..11a46508
--- /dev/null
+++ b/src/pages/changelog.md.ts
@@ -0,0 +1,51 @@
+import {
+ CHANGELOG_DESCRIPTION,
+ CHANGELOG_TITLE,
+ ENTRIES,
+ groupByMonth,
+ type ChangelogEntry,
+} from '~/data/changelog';
+
+// The Markdown twin of `/changelog/`. `[...slug].md.ts` only covers content
+// collection pages, and the changelog is a standalone `.astro` page, so without
+// this route the `` that `Head.astro`
+// emits for every page would point at a 404, and `Accept: text/markdown` on
+// `/changelog/` would fall back to HTML.
+export const prerender = true;
+
+function entryToMarkdown(e: ChangelogEntry): string {
+ return [
+ `### ${e.title}`,
+ `**${e.type}** in ${e.area}, version ${e.version}, ${e.date}. Permalink: [/changelog/#${e.id}](/changelog/#${e.id})`,
+ e.summary,
+ e.bullets.map((b) => `- ${b}`).join('\n'),
+ e.code && ['```sh', e.code, '```'].join('\n'),
+ e.docLink && `Docs: [${e.docLink.label}](${e.docLink.href})`,
+ ]
+ .filter(Boolean)
+ .join('\n\n');
+}
+
+export function GET() {
+ const frontmatter = [
+ '---',
+ `title: ${JSON.stringify(CHANGELOG_TITLE)}`,
+ `description: ${JSON.stringify(CHANGELOG_DESCRIPTION)}`,
+ '---',
+ ].join('\n');
+
+ const body = [
+ frontmatter,
+ `${CHANGELOG_DESCRIPTION} Newest first.`,
+ ...groupByMonth(ENTRIES).flatMap((group) => [
+ `## ${group.label}`,
+ ...group.items.map(entryToMarkdown),
+ ]),
+ ].join('\n\n');
+
+ // As in `[...slug].md.ts`, this header only applies in `astro dev` and
+ // `astro preview`; `public/_headers` sets it in production.
+ return new Response(`${body}\n`, {
+ headers: { 'Content-Type': 'text/markdown; charset=utf-8' },
+ });
+}
From 3d897b354c76a19958df60869513b82de5a470f1 Mon Sep 17 00:00:00 2001
From: Abhishek Doshi
{e.summary}
+
+ {e.summary
+ .split('`')
+ .map((part, i) => (i % 2 ? {part} : part))}
+
{part} : part))}
+ - Everything we shipped to Code Push, the CLI, and the API. Expand an entry - for the full detail, the command, and the doc it belongs to. + What we shipped to Code Push, the CLI, and the API. Expand an entry for the + full detail, the command, and the doc it belongs to. Subscribe with the RSS feed.
- {e.summary
- .split('`')
- .map((part, i) => (i % 2 ? {part} : part))}
-
{part} : part))}
- $ {e.code}
- )}
-
+ {e.summary
+ .split('`')
+ .map((part, i) => (i % 2 ? {part} : part))}
+
{part} : part,
+ )}
+ $ {e.code}
)}
-
- Release notes for {e.version}
-
-
- /changelog/#{e.id}
+
$ {e.code}
+ {e.code.split('\n').map((c) => `$ ${c}`).join('\n')}
)}
- What we shipped to Code Push, the CLI, and the API. Expand an entry for the - full detail, the command, and the doc it belongs to. Subscribe with the RSS feed.
@@ -203,7 +213,7 @@ function formatDay(iso: string): string { ))} {e.code && ( -{e.code.split('\n').map((c) => `$ ${c}`).join('\n')}
+ {commandLines(e.code).map((l, i) => [i > 0 && '\n', {l.text}])}
)}