pref: update post
This commit is contained in:
parent
25b579cca4
commit
1ae53a433c
@ -1,6 +1,8 @@
|
||||
interface Post {
|
||||
path: string
|
||||
title: string
|
||||
time: string
|
||||
author: string
|
||||
}
|
||||
|
||||
export { Post }
|
||||
|
@ -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 }
|
||||
})
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
---
|
||||
title: "贡献指南"
|
||||
author: "thehrz"
|
||||
time: "2023-02-15T22:23:48+08:00"
|
||||
---
|
||||
|
||||
# 贡献指南
|
||||
|
Loading…
Reference in New Issue
Block a user