Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default defineConfig({
},
},
editLink: {
pattern: 'https://github.com/pppolf/SCSWiki/edit/main/docs/:path',
pattern: 'https://github.com/CWNU-Open-Source-Community/SCSWiki/edit/main/docs/:path',
text: '在 GitHub 上编辑此页',
},
footer: {
Expand Down
22 changes: 6 additions & 16 deletions docs/.vitepress/nav.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
import type { DefaultTheme } from 'vitepress';
import { siteSections } from './site-map';

export const nav: DefaultTheme.NavItem[] = [
{ text: '首页', link: '/' },
{ text: '新生专题', link: '/start/', activeMatch: '^/start/' },
{ text: '专业学习', link: '/study/', activeMatch: '^/study/' },
{ text: '学科竞赛', link: '/competitions/', activeMatch: '^/competitions/' },
{ text: '学院组织', link: '/organization/', activeMatch: '^/organization/' },
{ text: '老师专栏', link: '/teacher/', activeMatch: '^/teacher/' },
{ text: '课程专栏', link: '/course/', activeMatch: '^/course/' },
{ text: '资料分享', link: '/materials/', activeMatch: '^/materials/' },
{ text: '党建专题', link: '/party/', activeMatch: '^/party/' },
{ text: '办事指南', link: '/services/', activeMatch: '^/services/' },
{ text: '校园生活', link: '/campus/', activeMatch: '^/campus/' },
{ text: '关于与贡献', link: '/about/', activeMatch: '^/about/' },
{ text: '常见问题', link: '/faq/', activeMatch: '^/faq/' },
{ text: '赞助', link: '/sponsor/', activeMatch: '^/sponsor/' },
];
export const nav: DefaultTheme.NavItem[] = siteSections.map((section) => ({
activeMatch: section.activeMatch,
items: section.links.map((link) => ({ link: link.href, text: link.title })),
text: section.title,
}));
92 changes: 92 additions & 0 deletions docs/.vitepress/site-map.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
export type SiteSectionLink = {
href: string;
title: string;
};

export type SiteSection = {
activeMatch: string;
description: string;
index: string;
links: SiteSectionLink[];
primaryHref: string;
title: string;
};

export const siteSections: SiteSection[] = [
{
activeMatch: '^/start/',
description: '从报到准备到入学适应,按新生真实任务组织信息。',
index: '01',
links: [
{ href: '/start/', title: '新生总览' },
{ href: '/start/online-registration', title: '报到与迎新' },
{ href: '/start/payment', title: '学杂费缴费' },
{ href: '/start/financial-aid', title: '学生资助' },
{ href: '/start/faq', title: '新生问答' },
],
primaryHref: '/start/',
title: '新生指南',
},
{
activeMatch: '^/(study|course|materials)/',
description: '整合专业学习、培养方案、选课与课程资料。',
index: '02',
links: [
{ href: '/study/', title: '专业学习' },
{ href: '/course/', title: '培养方案与选课' },
{ href: '/materials/', title: '课程资料' },
],
primaryHref: '/study/',
title: '学业与课程',
},
{
activeMatch: '^/(competitions|development|research|career)/',
description: '连接竞赛、开发、科研实践与升学就业。',
index: '03',
links: [
{ href: '/competitions/', title: '学科竞赛' },
{ href: '/development/', title: '开发与工具' },
{ href: '/research/', title: '科研与项目' },
{ href: '/career/', title: '升学与就业' },
],
primaryHref: '/competitions/',
title: '成长与实践',
},
{
activeMatch: '^/(campus|services|party)/',
description: '集中校园生活、日常办事和党团事务入口。',
index: '04',
links: [
{ href: '/campus/', title: '校园生活' },
{ href: '/services/', title: '办事指南' },
{ href: '/party/', title: '党团事务' },
],
primaryHref: '/campus/',
title: '校园与办事',
},
{
activeMatch: '^/(organization|teacher)/',
description: '查询学院概况、组织架构与教师课程参考。',
index: '05',
links: [
{ href: '/organization/', title: '学院概况与组织' },
{ href: '/teacher/', title: '教师专栏' },
],
primaryHref: '/organization/',
title: '学院信息',
},
{
activeMatch: '^/(about|faq|sponsor)/',
description: '了解内容边界,并参与纠错、贡献和赞助。',
index: '06',
links: [
{ href: '/about/', title: '项目介绍' },
{ href: '/about/trust', title: '可信度与内容边界' },
{ href: '/about/contribute', title: '参与贡献' },
{ href: '/faq/', title: '帮助与纠错' },
{ href: '/sponsor/', title: '赞助鸣谢' },
],
primaryHref: '/about/',
title: '关于本站',
},
];
Loading
Loading