File tree Expand file tree Collapse file tree 5 files changed +23
-15
lines changed
Expand file tree Collapse file tree 5 files changed +23
-15
lines changed Original file line number Diff line number Diff line change 11import DynamicTextField from '@/components/DynamicTextField' ;
22import getDynamicTextFieldMetadata from '@/utils/getDynamicTextField' ;
33import 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 > }
Original file line number Diff line number Diff line change 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.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 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.
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments