first commit
This commit is contained in:
1 parent
e85fbd62f4
commit
a0c64736eb
119 files changed
+13527
-1228
No files matched your search
@@ -0,0 +1,25 @@
|
||||
// Astro 构建时辅助函数,提供页面配置信息
|
||||
// 运行时由 Thymeleaf 模板中的 theme.config 覆盖
|
||||
|
||||
interface PageConfig {
|
||||
title: string
|
||||
slug: string
|
||||
enabled: boolean
|
||||
}
|
||||
|
||||
const pages: Record<string, PageConfig> = {
|
||||
moments: {
|
||||
title: '瞬间',
|
||||
slug: 'moments',
|
||||
enabled: true,
|
||||
},
|
||||
photos: {
|
||||
title: '图库',
|
||||
slug: 'photos',
|
||||
enabled: true,
|
||||
},
|
||||
}
|
||||
|
||||
export function findPageBySlug(slug: string): PageConfig | undefined {
|
||||
return pages[slug]
|
||||
}
|
||||
Reference in new issue
Block a user