mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-23 10:58:13 +08:00
36 lines
741 B
Markdown
36 lines
741 B
Markdown
---
|
||
title: sitemap
|
||
icon: mdi:sitemap-outline
|
||
createTime: 2024/03/02 16:47:00
|
||
permalink: /guide/sitemap/
|
||
---
|
||
|
||
## 使用
|
||
|
||
主题提供了开箱即用的配置,为 站点生成 `sitemap.xml` 文件。
|
||
要启用它,需要进行以下配置:
|
||
|
||
```ts title=".vuepress/config.ts"
|
||
export default defineUserConfig({
|
||
theme: plumeTheme({
|
||
hostname: 'http://your_site_url',
|
||
})
|
||
})
|
||
```
|
||
|
||
如需要自定义 sitemap,可以通过 `plugins.sitemap` 配置来实现。
|
||
|
||
```ts title=".vuepress/config.ts"
|
||
export default defineUserConfig({
|
||
theme: plumeTheme({
|
||
plugins: {
|
||
sitemap: {
|
||
// ... sitemap 配置
|
||
}
|
||
}
|
||
})
|
||
})
|
||
```
|
||
|
||
完整配置请查看 [文档](https://ecosystem.vuejs.press/zh/plugins/seo/sitemap/config.html)
|