init eslint
parent
5f78099325
commit
d06687867a
|
@ -0,0 +1,4 @@
|
|||
!.vitepress
|
||||
node_modules
|
||||
dist
|
||||
cache
|
|
@ -0,0 +1,5 @@
|
|||
extends:
|
||||
- '@hydrooj/eslint-config'
|
||||
rules:
|
||||
'@typescript-eslint/semi': [error, never]
|
||||
'@typescript-eslint/indent': [error, 2]
|
|
@ -1,19 +1,19 @@
|
|||
import footnote from 'markdown-it-footnote'
|
||||
import katex from 'markdown-it-katex'
|
||||
import mdPangu from 'markdown-it-pangu'
|
||||
import { defineConfig } from 'vitepress'
|
||||
import nav from './nav'
|
||||
import mdPangu from "markdown-it-pangu";
|
||||
import katex from 'markdown-it-katex';
|
||||
import footnote from 'markdown-it-footnote';
|
||||
import { getSidebar } from 'vitepress-plugin-auto-sidebar'
|
||||
import nav from './nav'
|
||||
|
||||
// https://vitepress.dev/reference/site-config
|
||||
export default defineConfig({
|
||||
title: "RLE.wiki",
|
||||
description: "一份RLE指北",
|
||||
title: 'RLE.wiki',
|
||||
description: '一份RLE指北',
|
||||
markdown: {
|
||||
config(md) {
|
||||
md.use(mdPangu);
|
||||
md.use(footnote);
|
||||
md.use(katex);
|
||||
md.use(mdPangu)
|
||||
md.use(footnote)
|
||||
md.use(katex)
|
||||
},
|
||||
},
|
||||
dir: 'docs',
|
||||
|
@ -30,7 +30,7 @@ export default defineConfig({
|
|||
}),
|
||||
|
||||
socialLinks: [
|
||||
{ icon: 'github', link: 'https://github.com/project-trans/RLE-wiki' }
|
||||
{ icon: 'github', link: 'https://github.com/project-trans/RLE-wiki' },
|
||||
],
|
||||
|
||||
editLink: {
|
||||
|
@ -48,5 +48,5 @@ export default defineConfig({
|
|||
prev: '上一页',
|
||||
next: '下一页',
|
||||
},
|
||||
}
|
||||
},
|
||||
})
|
||||
|
|
|
@ -2,25 +2,25 @@ import { DefaultTheme } from 'vitepress'
|
|||
|
||||
const nav = [
|
||||
{
|
||||
text: "大学指南",
|
||||
link: "/campus/",
|
||||
text: '大学指南',
|
||||
link: '/campus/',
|
||||
},
|
||||
{
|
||||
text: "Fashion",
|
||||
link: "/fashion/",
|
||||
text: 'Fashion',
|
||||
link: '/fashion/',
|
||||
},
|
||||
{
|
||||
text: "贡献指南",
|
||||
text: '贡献指南',
|
||||
items: [{
|
||||
text: "校园版块投稿指南",
|
||||
link: "/contributor-guide/campus.md",
|
||||
text: '校园版块投稿指南',
|
||||
link: '/contributor-guide/campus.md',
|
||||
}, {
|
||||
text: "其他投稿指南",
|
||||
link: "/contributor-guide/other.md",
|
||||
text: '其他投稿指南',
|
||||
link: '/contributor-guide/other.md',
|
||||
}, {
|
||||
text: "校园版块贡献模板",
|
||||
link: "/contributor-guide/CampusTemplate.md",
|
||||
text: '校园版块贡献模板',
|
||||
link: '/contributor-guide/CampusTemplate.md',
|
||||
}],
|
||||
},
|
||||
] satisfies DefaultTheme.Config['nav'];
|
||||
export default nav;
|
||||
] satisfies DefaultTheme.Config['nav']
|
||||
export default nav
|
||||
|
|
|
@ -1,17 +1,16 @@
|
|||
// https://vitepress.dev/guide/custom-theme
|
||||
import { h } from 'vue'
|
||||
import './style.css'
|
||||
|
||||
import type { Theme } from 'vitepress'
|
||||
import DefaultTheme from 'vitepress/theme'
|
||||
import './style.css'
|
||||
import { h } from 'vue'
|
||||
|
||||
export default {
|
||||
extends: DefaultTheme,
|
||||
Layout: () => {
|
||||
return h(DefaultTheme.Layout, null, {
|
||||
// https://vitepress.dev/guide/extending-default-theme#layout-slots
|
||||
})
|
||||
},
|
||||
Layout: () => h(DefaultTheme.Layout, null, {
|
||||
// https://vitepress.dev/guide/extending-default-theme#layout-slots
|
||||
}),
|
||||
enhanceApp({ app, router, siteData }) {
|
||||
// ...
|
||||
}
|
||||
},
|
||||
} satisfies Theme
|
||||
|
|
|
@ -11,14 +11,18 @@
|
|||
"build:old": "vuepress build docs",
|
||||
"clean-dev:old": "vuepress dev docs --clean-cache",
|
||||
"dev:old": "vuepress dev docs",
|
||||
"update-package": "pnpm dlx vp-update"
|
||||
"update-package": "pnpm dlx vp-update",
|
||||
"lint": "eslint docs --ext .ts,.vue,.md"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@hydrooj/eslint-config": "^1.0.6",
|
||||
"@types/markdown-it": "^13.0.7",
|
||||
"@types/markdown-it-footnote": "^3.0.3",
|
||||
"eslint": "^8.54.0",
|
||||
"markdown-it-footnote": "^3.0.3",
|
||||
"markdown-it-katex": "^2.0.3",
|
||||
"markdown-it-pangu": "^1.0.2",
|
||||
"typescript": "^5.3.2",
|
||||
"vitepress": "^1.0.0-rc.31",
|
||||
"vitepress-plugin-auto-sidebar": "^1.1.0",
|
||||
"vue": "^3.3.8",
|
||||
|
|
Loading…
Reference in New Issue