pref: update post

This commit is contained in:
thehrz 2023-07-30 17:53:00 +08:00
parent 25b579cca4
commit 1ae53a433c
Signed by: thehrz
GPG Key ID: C84CBCE7D5F88855
4 changed files with 7 additions and 1 deletions

View File

@ -1,6 +1,8 @@
interface Post {
path: string
title: string
time: string
author: string
}
export { Post }

View File

@ -5,6 +5,8 @@ import type { Post } from '~/common/interfaces/Post'
type Meta = {
frontmatter: {
title: string
time: string
author: string
}
} & RouteMeta
@ -17,6 +19,6 @@ export default (): Post[] => {
return routes.map((route) => {
const meta = route.meta as Meta
return { path: route.path, title: meta.frontmatter.title }
return { path: route.path, ...meta.frontmatter }
})
}

View File

@ -1,5 +1,7 @@
---
title: "贡献指南"
author: "thehrz"
time: "2023-02-15T22:23:48+08:00"
---
# 贡献指南