Skip to content

Commit 2b4b8c7

Browse files
committed
feat: add changelog system
This implements a new changelog system to the docs so it's easy to browse it and subscribe via RSS. Fixes MRGFY-5981 Change-Id: Ia2551cf70a6317a02376c287da41230680a05be4
1 parent 647a53a commit 2b4b8c7

File tree

147 files changed

+3344
-2251
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+3344
-2251
lines changed

eslint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export default [
1616
'node_modules/**',
1717
'.github/**',
1818
'public/scalar-api-reference.js',
19+
'src/content/changelog/',
1920
],
2021
},
2122

package-lock.json

Lines changed: 996 additions & 2241 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
"dependencies": {
6666
"@astrojs/check": "^0.9.5",
6767
"@astrojs/react": "^4.4.0",
68+
"@astrojs/rss": "^4.0.12",
6869
"@astrojs/vue": "^5.1.1",
6970
"@fontsource/ibm-plex-mono": "^5.2.7",
7071
"@fontsource/poppins": "^5.2.7",

src/@types/changelog-content.d.ts

Whitespace-only changes.

src/components/Breadcrumbs.astro

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,18 @@ for (const [p, t] of trails.entries()) {
4040
}
4141
}
4242
43+
// Handle dynamic changelog entries
44+
if (currentPath.startsWith('/changelog/') && currentPath !== '/changelog') {
45+
// This is a specific changelog entry page
46+
matchedTrail = [{ title: 'Changelog', path: '/changelog' }];
47+
48+
// Add the current page title from props if available
49+
const { breadcrumbTitle } = Astro.props as { breadcrumbTitle?: string };
50+
if (breadcrumbTitle) {
51+
matchedTrail.push({ title: breadcrumbTitle });
52+
}
53+
}
54+
4355
if (matchedTrail.length >= 2) {
4456
const filtered: TrailEntry[] = [];
4557
for (const entry of matchedTrail) {

src/components/Footer/footer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export const helpCategory: Category = {
8484
},
8585
{
8686
text: 'Changelog',
87-
href: 'https://changelog.mergify.com/',
87+
href: 'https://docs.mergify.com/changelog/',
8888
},
8989
{
9090
text: 'Terms of Service',

src/components/Header/Header.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ import ThemeToggleButton from './ThemeToggleButton';
8787
<HeaderLink href="https://slack.mergify.com" icon={SiSlack}>Slack Community</HeaderLink>
8888
<HeaderLink href="https://github.com/Mergifyio/mergify/discussions" icon={FaGithub}>
8989
Discussions
90-
</HeaderLink>
91-
<HeaderLink href="https://changelog.mergify.com" icon={HiOutlineDocumentArrowUp}>
90+
</HeaderLink>
91+
<HeaderLink href="/changelog/" icon={HiOutlineDocumentArrowUp} >
9292
Changelog
9393
</HeaderLink>
9494
<HeaderLink href="https://status.mergify.com" icon={SiStatuspage}>Status</HeaderLink>

src/content.config.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { defineCollection, z } from 'astro:content';
33
import { glob } from 'astro/loaders';
44

55
const docs = defineCollection({
6-
/* ... */
6+
/* Documentation pages */
77
loader: glob({
88
pattern: '**/[^_]*.mdx',
99
base: './src/content/docs',
@@ -16,4 +16,14 @@ const docs = defineCollection({
1616
}),
1717
});
1818

19-
export const collections = { docs };
19+
const changelog = defineCollection({
20+
type: 'content',
21+
schema: z.object({
22+
title: z.string(),
23+
date: z.date(),
24+
description: z.string().optional(),
25+
tags: z.array(z.string()).default([]),
26+
}),
27+
});
28+
29+
export const collections = { docs, changelog };
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: New option batch_max_wait_time
3+
date: 2022-01-05
4+
tags:
5+
- Merge Queue
6+
description: "Add the new option `batch_max_wait_time` for queue."
7+
---
8+
9+
Add the new option [`batch_max_wait_time`](https://docs.mergify.com/actions/queue/#queue-rules) for queue.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: batch_max_wait_time defaults to 30s
3+
date: 2022-01-06
4+
tags:
5+
- Merge Queue
6+
- Workflow Automation
7+
description: "Change the default value for `batch_max_wait_time` to `30s`."
8+
---
9+
10+
Change the default value for `batch_max_wait_time` to `30s`.

0 commit comments

Comments
 (0)