fix: 归档修复,不再更新该模板,后续会开源新模板!

This commit is contained in:
2025-06-28 10:04:11 +08:00
parent dc5e159616
commit dca89ae4d0
560 changed files with 76 additions and 19893 deletions

View File

@@ -6,7 +6,7 @@ export const markdown: MarkdownOptions = {
// Shiki主题, 所有主题参见: https://github.com/shikijs/shiki/blob/main/docs/themes.md
theme: {
light: 'github-light',
dark: 'github-dark-dimmed'
dark: 'github-dark'
},
// lineNumbers: true, // 启用行号

View File

@@ -4,19 +4,14 @@ export const nav: DefaultTheme.Config['nav'] = [
{
text: '我的分类',
items: [
{ text: 'Bug万象集', link: '/categories/issues/index', activeMatch: '/categories/issues/' },
{ text: '"杂碎"逆袭史', link: '/categories/fragments/index', activeMatch: '/categories/fragments/' },
{ text: '工具四海谈', link: '/categories/tools/index', activeMatch: '/categories/tools/' },
{ text: '方案春秋志', link: '/categories/solutions/index', activeMatch: '/categories/solutions/' }
{ text: '分类1', link: '/categories/category1/index', activeMatch: '/categories/category1/' },
],
activeMatch: '/categories/'
},
{
text: '我的小册',
items: [
{ text: 'Java基础快速入门', link: '/courses/java/index', activeMatch: '/courses/java/' },
{ text: 'MySQL快速入门', link: '/courses/mysql/index', activeMatch: '/courses/mysql/' },
{ text: 'MyBatis快速入门', link: '/courses/mybatis/index', activeMatch: '/courses/mybatis/' }
{ text: '小册1', link: '/courses/course1/index', activeMatch: '/courses/course1/' },
],
activeMatch: '/courses/'
},
@@ -30,12 +25,4 @@ export const nav: DefaultTheme.Config['nav'] = [
link: '/archives',
activeMatch: '/archives'
},
{
text: '关于',
items: [
{ text: '关于知识库', link: '/about/index', activeMatch: '/about/index' },
{ text: '关于我', link: '/about/me', activeMatch: '/about/me' }
],
activeMatch: '/about/' // // 当前页面处于匹配路径下时, 对应导航菜单将突出显示
},
];
];

View File

@@ -5,21 +5,16 @@ import { getChineseZodiac, getChineseZodiacAlias } from '../theme/utils.ts';
const sync = fg.sync;
export const sidebar: DefaultTheme.Config['sidebar'] = {
'/categories/issues/': getItemsByDate("categories/issues"),
'/categories/fragments/': getItemsByDate("categories/fragments"),
'/categories/solutions/': getItemsByDate("categories/solutions"),
'/categories/tools/': getItemsByDate("categories/tools"),
'/categories/category1/': getItemsByDate("categories/category1"),
'/courses/java/': getItems("courses/java"),
'/courses/mysql/': getItems("courses/mysql"),
'/courses/mybatis/': getItems("courses/mybatis"),
'/courses/course1/': getItems("courses/course1"),
}
/**
* 根据 某分类/YYYY/MM/dd/xxx.md 的目录格式, 获取侧边栏分组及分组下标题
*
*
* /categories/issues/2022/07/20/xxx.md
*
*
* @param path 扫描基础路径
* @returns {DefaultTheme.SidebarItem[]}
*/
@@ -107,9 +102,9 @@ function getItemsByDate (path: string) {
/**
* 根据 某小课/序号-分组/序号-xxx.md 的目录格式, 获取侧边栏分组及分组下标题
*
*
* courses/mybatis/01-MyBatis基础/01-xxx.md
*
*
* @param path 扫描基础路径
* @returns {DefaultTheme.SidebarItem[]}
*/
@@ -163,7 +158,7 @@ function getItems (path: string) {
/**
* 添加序号
*
*
* @param groups 分组数据
*/
function addOrderNumber(groups) {
@@ -182,4 +177,4 @@ function addOrderNumber(groups) {
items[j].text = `${indexStyle}${items[j].text}`;
}
}
}
}

View File

@@ -16,7 +16,13 @@ export const themeConfig: DefaultTheme.Config = {
darkModeSwitchLabel: '切换日光/暗黑模式',
sidebarMenuLabel: '文章',
returnToTopLabel: '返回顶部',
lastUpdatedText: '最后更新', // 最后更新时间文本配置, 需先配置lastUpdated为true
lastUpdated: {
text: '最后更新',
formatOptions:{
dateStyle:'full',
timeStyle:'short'
}
},
// 文档页脚文本配置
docFooter: {
prev: '上一篇',
@@ -57,7 +63,7 @@ export const themeConfig: DefaultTheme.Config = {
<path fill="#12D2AC" d="M41.7,158.5l16.1,9.4,100.6-58.7V90.4Z"/>
</svg>`
},
link: 'https://cnadmin.charles7c.top/'
link: 'https://continew.top/'
}
],
@@ -65,7 +71,7 @@ export const themeConfig: DefaultTheme.Config = {
// @ts-ignore
articleMetadataConfig: {
author: '查尔斯', // 文章全局默认作者名称
authorLink: '/about/me', // 点击作者名时默认跳转的链接
authorLink: 'https://charles7c.top', // 点击作者名时默认跳转的链接
showViewCount: false, // 是否显示文章阅读数, 需要在 docs/.vitepress/theme/api/config.js 及 interface.js 配置好相应 API 接口
},
// 自定义扩展: 文章版权配置
@@ -81,8 +87,8 @@ export const themeConfig: DefaultTheme.Config = {
// 自定义扩展: 页脚配置
footerConfig: {
showFooter: true, // 是否显示页脚
icpRecordCode: '津ICP备2022005864号-2', // ICP备案号
publicSecurityRecordCode: '津公网安备12011202000677号', // 联网备案号
icpRecordCode: '津ICP备xxxx-1', // ICP备案号
publicSecurityRecordCode: '津公网安备xxxx号', // 联网备案号
copyright: `Copyright © 2019-${new Date().getFullYear()} Charles7c` // 版权信息
}
}
}