Compare commits
2 Commits
1c3e10f9ac
...
df3480a3eb
Author | SHA1 | Date | |
---|---|---|---|
df3480a3eb | |||
2a0c858ce9 |
16
.vscode/settings.json
vendored
Normal file
16
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
// 窗口失去焦点自动保存文件
|
||||||
|
"files.autoSave": "onWindowChange",
|
||||||
|
// 保存文件时删除行尾的空格
|
||||||
|
"files.trimTrailingWhitespace": true,
|
||||||
|
// 自动从当前 Git 仓库的默认远程仓库提取提交
|
||||||
|
"git.autofetch": true,
|
||||||
|
// 配置文件 File Nesting
|
||||||
|
"explorer.fileNesting.enabled": true,
|
||||||
|
"explorer.fileNesting.expand": false,
|
||||||
|
"explorer.fileNesting.patterns": {
|
||||||
|
"package.json": "package-lock.json,LICENSE",
|
||||||
|
".gitignore": ".gitattributes",
|
||||||
|
"tsconfig.json":"tsconfig.*.json,auto-imports.d.ts,components.d.ts,decs.d.ts",
|
||||||
|
}
|
||||||
|
}
|
@@ -1,6 +1,10 @@
|
|||||||
import { defineConfig } from 'vitepress'
|
import { defineConfig } from 'vitepress'
|
||||||
import { sidebar } from '../sidebar.mts'
|
import { sidebar } from '../sidebar.mts'
|
||||||
import { nav } from '../nav.mts'
|
import { nav } from '../nav.mts'
|
||||||
|
import {
|
||||||
|
GitChangelog,
|
||||||
|
GitChangelogMarkdownSection,
|
||||||
|
} from '@nolebase/vitepress-plugin-git-changelog/vite'
|
||||||
|
|
||||||
// https://vitepress.dev/reference/site-config
|
// https://vitepress.dev/reference/site-config
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
@@ -8,12 +12,26 @@ export default defineConfig({
|
|||||||
server: {
|
server: {
|
||||||
port: 5678,
|
port: 5678,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
plugins: [
|
||||||
|
GitChangelog({
|
||||||
|
// 填写在此处填写您的仓库链接
|
||||||
|
repoURL: () => 'https://github.com/coder-xiaomo/tutorials',
|
||||||
|
}),
|
||||||
|
GitChangelogMarkdownSection(),
|
||||||
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
title: "就这么弄",
|
title: "就这么弄",
|
||||||
description: "简单步骤与实用技巧",
|
description: "简单步骤与实用技巧",
|
||||||
|
|
||||||
base: '/tutorials/',
|
base: '/tutorials/',
|
||||||
|
locales: {
|
||||||
|
root: {
|
||||||
|
label: '简体中文',
|
||||||
|
lang: 'zh-CN',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
themeConfig: {
|
themeConfig: {
|
||||||
// https://vitepress.dev/reference/default-theme-config
|
// https://vitepress.dev/reference/default-theme-config
|
||||||
|
@@ -5,6 +5,11 @@ import DefaultTheme from 'vitepress/theme'
|
|||||||
import './style.css'
|
import './style.css'
|
||||||
import './custom.css'
|
import './custom.css'
|
||||||
import ArticleInfo from './components/ArticleInfo.vue'
|
import ArticleInfo from './components/ArticleInfo.vue'
|
||||||
|
import {
|
||||||
|
NolebaseGitChangelogPlugin
|
||||||
|
} from '@nolebase/vitepress-plugin-git-changelog/client'
|
||||||
|
|
||||||
|
import '@nolebase/vitepress-plugin-git-changelog/client/style.css'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
extends: DefaultTheme,
|
extends: DefaultTheme,
|
||||||
@@ -16,5 +21,20 @@ export default {
|
|||||||
},
|
},
|
||||||
enhanceApp({ app, router, siteData }) {
|
enhanceApp({ app, router, siteData }) {
|
||||||
// ...
|
// ...
|
||||||
|
app.use(NolebaseGitChangelogPlugin, {
|
||||||
|
// see: https://nolebase-integrations.ayaka.io/pages/zh-CN/integrations/vitepress-plugin-git-changelog/configure-ui
|
||||||
|
locales: {
|
||||||
|
'zh-CN': {
|
||||||
|
changelog: {
|
||||||
|
title: '页面历史',
|
||||||
|
noData: '暂无最近变更历史',
|
||||||
|
lastEdited: '本页面最后编辑于 {{daysAgo}}',
|
||||||
|
lastEditedDateFnsLocaleName: 'zhCN',
|
||||||
|
viewFullHistory: '查看完整历史',
|
||||||
|
committedOn: '于 {{date}} 提交',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
} satisfies Theme
|
} satisfies Theme
|
||||||
|
1052
package-lock.json
generated
1052
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -11,6 +11,7 @@
|
|||||||
"vue": "^3.5.13"
|
"vue": "^3.5.13"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@nolebase/vitepress-plugin-git-changelog": "^2.15.1",
|
||||||
"vitepress": "^1.6.3"
|
"vitepress": "^1.6.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user