Skip to content

Commit 6f8cd73

Browse files
committed
Updated changelog
1 parent 6272092 commit 6f8cd73

File tree

5 files changed

+40
-23
lines changed

5 files changed

+40
-23
lines changed

content/changelog/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Change Log
22

3-
## [10.0.0] - 2024-xx-xx - [Release notes](https://beta.frontmatter.codes/updates/v10.0.0)
3+
## [10.0.0] - 2024-02-28 - [Release notes](https://beta.frontmatter.codes/updates/v10.0.0)
44

55
### ✨ New features
66

@@ -19,6 +19,7 @@
1919
- [#747](https://github.com/estruyf/vscode-front-matter/issues/747): The `@frontmatter/extensibility` dependency now supports scripts for placeholders
2020
- [#752](https://github.com/estruyf/vscode-front-matter/issues/752): Placeholder support in default `list` field values
2121
- Support for using the `fieldCollection` field in a `block` field
22+
- Updated the list of commands which are available in the command palette
2223

2324
### 🐞 Fixes
2425

content/changelog/v10.0.0.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: Version 10.0.0 release notes
3-
description: Discover the highly anticipated multilingual support in version 10.0.0 of our CMS, allowing you to manage content in multiple languages.
3+
description: Version 10.0.0 of our CMS introduces the much-awaited feature of multilingual support, enabling you to handle content in various languages, new taxonomy view, media content types, and more.
44
date: 2024-02-28T10:48:53.569Z
5-
lastmod: 2024-02-28T10:48:56.854Z
5+
lastmod: 2024-02-28T11:07:43.176Z
66
slug: v10.0.0
77
type: changelog
88
---

pages/api/og.tsx

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ export const config = {
88
export default async function (request: NextRequest) {
99
const { searchParams } = new URL(request.url);
1010

11+
const hasType = searchParams.has('type');
12+
const type = hasType ? searchParams.get('type') : '';
13+
1114
// ?title=<title>
1215
const hasTitle = searchParams.has('title');
1316
const title = hasTitle ? searchParams.get('title') : '';
@@ -68,22 +71,27 @@ export default async function (request: NextRequest) {
6871
</p>
6972
</section>
7073

71-
<div style={{
72-
display: 'flex',
73-
}}>
74-
<span tw="uppercase text-base rounded" style={{
75-
marginTop: '1rem',
76-
alignItems: 'center',
77-
justifyContent: 'center',
78-
fontSize: '1rem',
79-
fontWeight: '500',
80-
backgroundColor: '#29d6df',
81-
padding: '0.5rem 1rem',
82-
fontFamily: "Open Sans"
83-
}}>
84-
Docs
85-
</span>
86-
</div>
74+
{
75+
type && (
76+
<div style={{
77+
display: 'flex',
78+
}}>
79+
<span tw="uppercase text-base rounded" style={{
80+
marginTop: '1rem',
81+
alignItems: 'center',
82+
justifyContent: 'center',
83+
fontSize: '1rem',
84+
fontWeight: '500',
85+
backgroundColor: '#29d6df',
86+
padding: '0.5rem 1rem',
87+
fontFamily: "Open Sans"
88+
}}>
89+
{type}
90+
</span>
91+
</div>
92+
)
93+
}
94+
8795
</div>
8896

8997
<div tw="h-8 w-full absolute bottom-0" style={{

pages/docs/[...slug].tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export async function getStaticProps({ params }: Params) {
7070

7171
doc.content = await markdownToHtml(doc.content || '');
7272

73-
let ogImage = `/api/og?title=${encodeURIComponent(doc.title)}`;
73+
let ogImage = `/api/og?type=Docs&title=${encodeURIComponent(doc.title)}`;
7474
if (doc.description) {
7575
ogImage += `&description=${encodeURIComponent(doc.description)}`;
7676
}

pages/updates/[slug].tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ import { Layout } from '../../components/Page/Layout';
55
import { getAllPosts, getPostByFilename } from '../../lib/api';
66
import markdownToHtml from '../../utils/markdownToHtml';
77

8-
export default function Home({ title, content, description, date }: any) {
8+
export default function Home({ title, content, description, date, ogImage }: any) {
99
const pubDate = date ? parseJSON(date) : '';
1010

1111
return (
1212
<>
1313
<Title value={title} />
1414
<Description value={title} />
15-
<OtherMeta image={`/assets/frontmatter-social.png`} />
15+
<OtherMeta image={ogImage || `/assets/frontmatter-social.png`} />
1616

1717
<Layout>
1818
<div className="max-w-7xl mx-auto py-8 px-4 sm:px-6 lg:px-8 xl:px-0 divide-y-2 divide-vulcan-200">
@@ -41,8 +41,16 @@ export const getStaticProps = async ({ params }: any) => {
4141
const changes = getPostByFilename('changelog', `${params.slug}.md`, ['title', 'content', 'description', 'date']);
4242
changes.content = await markdownToHtml(changes.content || '');
4343

44+
let ogImage = `/api/og?type=Updates&title=${encodeURIComponent(changes.title)}`;
45+
if (changes.description) {
46+
ogImage += `&description=${encodeURIComponent(changes.description)}`;
47+
}
48+
4449
return {
45-
props: { ...changes }
50+
props: {
51+
...changes,
52+
ogImage
53+
}
4654
}
4755
}
4856

0 commit comments

Comments
 (0)