Skip to content

Commit eb54eb5

Browse files
committed
blog page -> articles
1 parent baf3afa commit eb54eb5

File tree

5 files changed

+23
-15
lines changed

5 files changed

+23
-15
lines changed

app/blog/page.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import DynamicTextField from '@/components/DynamicTextField';
22
import getDynamicTextFieldMetadata from '@/utils/getDynamicTextField';
33
import Footer from "@/components/Footer";
4+
import {DocsDescription, DocsTitle} from "fumadocs-ui/page";
45

56

6-
export default function SwiftForAndroid() {
7+
export default function BlogPage() {
78
const postMatadata = getDynamicTextFieldMetadata("content/Blog")
8-
99
return (
1010
<div>
1111
<div
@@ -15,7 +15,11 @@ export default function SwiftForAndroid() {
1515
{<div className="container prose">
1616
{postMatadata.map((post, postIndex) => {
1717
return (
18-
<DynamicTextField key={postIndex} post={post}/>
18+
<div className="mb-16" key={postIndex}>
19+
<DocsTitle>{post.title}</DocsTitle>
20+
<DocsDescription>{post.publishedFormated}</DocsDescription>
21+
<DynamicTextField key={postIndex} post={post}/>
22+
</div>
1923
)
2024
})}
2125
</div>}

content/Blog/Beta2.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: Beta 2 of SCADE AppLogic released
3+
publishedDate: 2025-02-11T10:10:10.000Z
4+
---
5+
SCADE AppLogic is further maturing with the release of our beta 2.

content/Blog/Blog.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

content/Blog/Redesigned.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: Redesigned www.scade.io is now live
3+
publishedDate: 2025-07-16T10:10:10.000Z
4+
---
5+
We are pleased to announced our redesigned websites. Both the main page and the technical documentation has been redesigned.

utils/getDynamicTextField.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,19 @@ export default function getDynamicTextField (basePath) {
88

99
const posts = markdownPost.map((filename) => {
1010
const fileContents = fs.readFileSync(`${basePath}/${filename}`, "utf-8")
11-
const matterResult = matter(fileContents)
11+
const matterResult = matter(fileContents);
12+
const date = new Date(matterResult.data.publishedDate)
1213
return{
14+
publishedDate: date,
15+
publishedFormated: date.toLocaleDateString(),
16+
description: matterResult.data.description,
1317
title: matterResult.data.title,
1418
id: matterResult.data.id,
15-
1619
content: matterResult.content,
1720
}
1821

1922
})
20-
return posts
23+
return posts.sort((a, b) => b.publishedDate - a.publishedDate)
2124
}
2225

2326

0 commit comments

Comments
 (0)