docs: 添加sitemap支持

This commit is contained in:
SherkeyXD
2023-08-02 21:38:35 +08:00
parent f54cdcc063
commit 73f05342a2
5 changed files with 3653 additions and 586 deletions

View File

@@ -1,6 +1,7 @@
import { defineUserConfig } from 'vuepress';
import Theme from './theme.config';
import SearchPlugin from './plugins/search';
import SitemapPlugin from './plugins/sitemap';
export default defineUserConfig({
base: '/docs/',
@@ -36,7 +37,10 @@ export default defineUserConfig({
level: [2, 3, 4, 5],
},
},
plugins: [SearchPlugin()],
plugins: [
SitemapPlugin(),
SearchPlugin()
],
temp: '.vuepress/.temp',
cache: '.vuepress/.cache'
});

View File

@@ -0,0 +1,7 @@
import { sitemapPlugin } from "vuepress-plugin-sitemap2";
export default function SitemapPlugin() {
return sitemapPlugin({
hostname: "https://maa.plus",
});
}

4222
docs/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -14,7 +14,8 @@
"markdown-it": "^13.0.1",
"markdown-it-anchor": "^8.6.7",
"markdownlint-cli": "^0.32.2",
"vuepress": "^2.0.0-beta.63"
"vuepress": "^2.0.0-beta.63",
"vuepress-plugin-sitemap2": "^2.0.0-beta.233"
},
"scripts": {
"dev": "vuepress dev .",

View File

@@ -1,4 +1,3 @@
{
"extends": "maa-tsconfig/react-library.json",
"include": [".vuepress/**/*.ts"]
}