starter\magzine\gitbook 主题dashboard元素

This commit is contained in:
tangly1024.com
2024-11-19 19:00:57 +08:00
parent ed947d866e
commit 2988426a2f
19 changed files with 1018 additions and 81 deletions

View File

@@ -1,3 +1,4 @@
import BLOG from '@/blog.config'
import { siteConfig } from '@/lib/config'
import { getGlobalData } from '@/lib/db/getSiteData'
import { DynamicLayout } from '@/themes/theme'

View File

@@ -75,14 +75,17 @@ export async function getStaticProps({ locale }) {
export const getStaticPaths = async () => {
return {
// 定义需要预渲染的路径
paths: [
{ params: { index: [''] } }, // 对应 /dashboard
{ params: { index: ['membership'] } }, // 对应 /dashboard/membership
{ params: { index: ['order'] } }, // 对应 /dashboard/order
{ params: { index: ['favorite'] } } // 对应 /dashboard/favorite
{ params: { index: [] } }, // 对应首页路径
{ params: { index: ['membership'] } },
{ params: { index: ['balance'] } },
{ params: { index: ['user-profile'] } },
{ params: { index: ['user-profile', 'security'] } }, // 嵌套路由,按结构传递
{ params: { index: ['order'] } },
{ params: { index: ['affiliate'] } }
],
fallback: 'blocking' // 或者 true阻塞式渲染
}
}
export default Dashboard