提交 b9060c9e 编写于 作者: Miykael_xxm's avatar Miykael_xxm 🚴

seo

上级 c80f65aa
......@@ -9,6 +9,7 @@ pages:
- yarn install # npm install
- yarn add -D vuepress # npm install -D vuepress
- yarn docs:build # npm run docs:build
- cp robots.txt public/
- mv docs/.vuepress/dist public
artifacts:
paths:
......
node_modules
docs/.vuepress/dist
\ No newline at end of file
docs/.vuepress/dist
.vscode
package-lock.json
\ No newline at end of file
// .vuepress/config.js
const autometa_options = {
site: {
name: 'Spring 中文文档社区'
},
canonical_base: 'https://dev-cloud.gitcode.host/spring/',
};
module.exports = {
title: "Spring 中文文档社区",
base: "/spring/",
......@@ -46,11 +53,13 @@ module.exports = {
{
rel: 'mask-icon',
href: '/images/icons/favicon.ico',
color: '#3eaf7c',
color: '#5dac38',
},
],
['meta', { name: 'msapplication-TileColor', content: '#3eaf7c' }],
['meta', { name: 'theme-color', content: '#3eaf7c' }],
['meta', { name: 'msapplication-TileColor', content: '#5dac38' }],
['meta', { name: 'theme-color', content: '#5dac38' }],
['meta', { name: 'viewport', content: 'width=device-width, initial-scale=1' }],
['meta', { 'http-equiv': 'X-UA-Compatible', 'content': 'IE=edge' }]
],
locales: {
'/en/': {
......@@ -64,6 +73,14 @@ module.exports = {
description: ''
}
},
plugins: [
['autometa', autometa_options],
['sitemap', {
hostname: "https://dev-cloud.gitcode.host/spring/",
// 排除无实际内容的页面
exclude: ["/404.html"]
}]
],
themeConfig: {
repo: "https://gitcode.net/dev-cloud/spring",
repoLabel: "GitCode",
......
export * as navbar from './navbar'
export * as sidebar from './sidebar'
export { version } from '../../../lerna.json'
import type { NavbarConfig } from '@vuepress/theme-default'
import { version } from '../meta'
export const en: NavbarConfig = [
{
text: 'Guide',
link: '/guide/',
},
{
text: 'Reference',
children: [
{
text: 'VuePress',
children: [
{
text: 'CLI',
link: '/reference/cli.html',
},
'/reference/config.md',
'/reference/frontmatter.md',
'/reference/components.md',
'/reference/plugin-api.md',
'/reference/theme-api.md',
'/reference/client-api.md',
'/reference/node-api.md',
],
},
{
text: 'Bundlers',
children: [
'/reference/bundler/vite.md',
'/reference/bundler/webpack.md',
],
},
{
text: 'Default Theme',
children: [
'/reference/default-theme/config.md',
'/reference/default-theme/frontmatter.md',
'/reference/default-theme/components.md',
'/reference/default-theme/markdown.md',
'/reference/default-theme/styles.md',
'/reference/default-theme/extending.md',
],
},
],
},
{
text: 'Plugins',
children: [
{
text: 'Common Features',
children: [
'/reference/plugin/back-to-top.md',
'/reference/plugin/container.md',
'/reference/plugin/external-link-icon.md',
'/reference/plugin/google-analytics.md',
'/reference/plugin/medium-zoom.md',
'/reference/plugin/nprogress.md',
'/reference/plugin/register-components.md',
],
},
{
text: 'Content Search',
children: [
'/reference/plugin/docsearch.md',
'/reference/plugin/search.md',
],
},
{
text: 'PWA',
children: [
'/reference/plugin/pwa.md',
'/reference/plugin/pwa-popup.md',
],
},
{
text: 'Syntax Highlighting',
children: [
'/reference/plugin/prismjs.md',
'/reference/plugin/shiki.md',
],
},
{
text: 'Theme Development',
children: [
'/reference/plugin/active-header-links.md',
'/reference/plugin/git.md',
'/reference/plugin/palette.md',
'/reference/plugin/theme-data.md',
'/reference/plugin/toc.md',
],
},
],
},
{
text: 'Learn More',
children: [
{
text: 'Advanced',
children: [
'/advanced/architecture.md',
'/advanced/plugin.md',
'/advanced/theme.md',
{
text: 'Cookbook',
link: '/advanced/cookbook/',
},
],
},
{
text: 'Resources',
children: [
'/contributing.md',
{
text: 'Awesome VuePress',
link: 'https://github.com/vuepress/awesome-vuepress',
},
],
},
],
},
{
text: `v${version}`,
children: [
{
text: 'Changelog',
link: 'https://github.com/vuepress/vuepress-next/blob/main/CHANGELOG.md',
},
{
text: 'v1.x',
link: 'https://v1.vuepress.vuejs.org',
},
{
text: 'v0.x',
link: 'https://v0.vuepress.vuejs.org',
},
],
},
]
export * from './en'
export * from './zh'
import type { NavbarConfig } from '@vuepress/theme-default'
import { version } from '../meta'
export const zh: NavbarConfig = [
{
text: '指南',
link: '/zh/guide/',
},
{
text: '参考',
children: [
{
text: 'VuePress',
children: [
'/zh/reference/cli.md',
'/zh/reference/config.md',
'/zh/reference/frontmatter.md',
'/zh/reference/components.md',
'/zh/reference/plugin-api.md',
'/zh/reference/theme-api.md',
'/zh/reference/client-api.md',
'/zh/reference/node-api.md',
],
},
{
text: '打包工具',
children: [
'/zh/reference/bundler/vite.md',
'/zh/reference/bundler/webpack.md',
],
},
{
text: '默认主题',
children: [
'/zh/reference/default-theme/config.md',
'/zh/reference/default-theme/frontmatter.md',
'/zh/reference/default-theme/components.md',
'/zh/reference/default-theme/markdown.md',
'/zh/reference/default-theme/styles.md',
'/zh/reference/default-theme/extending.md',
],
},
],
},
{
text: '插件',
children: [
{
text: '常用功能',
children: [
'/zh/reference/plugin/back-to-top.md',
'/zh/reference/plugin/container.md',
'/zh/reference/plugin/external-link-icon.md',
'/zh/reference/plugin/google-analytics.md',
'/zh/reference/plugin/medium-zoom.md',
'/zh/reference/plugin/nprogress.md',
'/zh/reference/plugin/register-components.md',
],
},
{
text: '内容搜索',
children: [
'/zh/reference/plugin/docsearch.md',
'/zh/reference/plugin/search.md',
],
},
{
text: 'PWA',
children: [
'/zh/reference/plugin/pwa.md',
'/zh/reference/plugin/pwa-popup.md',
],
},
{
text: '语法高亮',
children: [
'/zh/reference/plugin/prismjs.md',
'/zh/reference/plugin/shiki.md',
],
},
{
text: '主题开发',
children: [
'/zh/reference/plugin/active-header-links.md',
'/zh/reference/plugin/git.md',
'/zh/reference/plugin/palette.md',
'/zh/reference/plugin/theme-data.md',
'/zh/reference/plugin/toc.md',
],
},
],
},
{
text: '了解更多',
children: [
{
text: '深入',
children: [
'/zh/advanced/architecture.md',
'/zh/advanced/plugin.md',
'/zh/advanced/theme.md',
{
text: 'Cookbook',
link: '/zh/advanced/cookbook/',
},
],
},
{
text: '其他资源',
children: [
'/zh/contributing.md',
{
text: 'Awesome VuePress',
link: 'https://github.com/vuepress/awesome-vuepress',
},
],
},
],
},
{
text: `v${version}`,
children: [
{
text: '更新日志',
link: 'https://github.com/vuepress/vuepress-next/blob/main/CHANGELOG.md',
},
{
text: 'v1.x',
link: 'https://v1.vuepress.vuejs.org/zh/',
},
{
text: 'v0.x',
link: 'https://v0.vuepress.vuejs.org/zh/',
},
],
},
]
import type { SidebarConfig } from '@vuepress/theme-default'
export const en: SidebarConfig = {
'/guide/': [
{
text: 'Guide',
children: [
'/guide/README.md',
'/guide/getting-started.md',
'/guide/configuration.md',
'/guide/page.md',
'/guide/markdown.md',
'/guide/assets.md',
'/guide/i18n.md',
'/guide/deployment.md',
'/guide/theme.md',
'/guide/plugin.md',
'/guide/bundler.md',
'/guide/migration.md',
],
},
],
'/advanced/': [
{
text: 'Advanced',
children: [
'/advanced/architecture.md',
'/advanced/plugin.md',
'/advanced/theme.md',
],
},
{
text: 'Cookbook',
children: [
'/advanced/cookbook/README.md',
'/advanced/cookbook/usage-of-client-app-enhance.md',
'/advanced/cookbook/adding-extra-pages.md',
'/advanced/cookbook/making-a-theme-extendable.md',
'/advanced/cookbook/passing-data-to-client-code.md',
'/advanced/cookbook/markdown-and-vue-sfc.md',
],
},
],
'/reference/': [
{
text: 'VuePress Reference',
collapsible: true,
children: [
'/reference/cli.md',
'/reference/config.md',
'/reference/frontmatter.md',
'/reference/components.md',
'/reference/plugin-api.md',
'/reference/theme-api.md',
'/reference/client-api.md',
'/reference/node-api.md',
],
},
{
text: 'Bundlers Reference',
collapsible: true,
children: ['/reference/bundler/vite.md', '/reference/bundler/webpack.md'],
},
{
text: 'Default Theme Reference',
collapsible: true,
children: [
'/reference/default-theme/config.md',
'/reference/default-theme/frontmatter.md',
'/reference/default-theme/components.md',
'/reference/default-theme/markdown.md',
'/reference/default-theme/styles.md',
'/reference/default-theme/extending.md',
],
},
{
text: 'Official Plugins Reference',
collapsible: true,
children: [
{
text: 'Common Features',
children: [
'/reference/plugin/back-to-top.md',
'/reference/plugin/container.md',
'/reference/plugin/external-link-icon.md',
'/reference/plugin/google-analytics.md',
'/reference/plugin/medium-zoom.md',
'/reference/plugin/nprogress.md',
'/reference/plugin/register-components.md',
],
},
{
text: 'Content Search',
children: [
'/reference/plugin/docsearch.md',
'/reference/plugin/search.md',
],
},
{
text: 'PWA',
children: [
'/reference/plugin/pwa.md',
'/reference/plugin/pwa-popup.md',
],
},
{
text: 'Syntax Highlighting',
children: [
'/reference/plugin/prismjs.md',
'/reference/plugin/shiki.md',
],
},
{
text: 'Theme Development',
children: [
'/reference/plugin/active-header-links.md',
'/reference/plugin/git.md',
'/reference/plugin/palette.md',
'/reference/plugin/theme-data.md',
'/reference/plugin/toc.md',
],
},
],
},
],
}
export * from './en'
export * from './zh'
import type { SidebarConfig } from '@vuepress/theme-default'
export const zh: SidebarConfig = {
'/zh/guide/': [
{
text: '指南',
children: [
'/zh/guide/README.md',
'/zh/guide/getting-started.md',
'/zh/guide/configuration.md',
'/zh/guide/page.md',
'/zh/guide/markdown.md',
'/zh/guide/assets.md',
'/zh/guide/i18n.md',
'/zh/guide/deployment.md',
'/zh/guide/theme.md',
'/zh/guide/plugin.md',
'/zh/guide/bundler.md',
'/zh/guide/migration.md',
],
},
],
'/zh/advanced/': [
{
text: '深入',
children: [
'/zh/advanced/architecture.md',
'/zh/advanced/plugin.md',
'/zh/advanced/theme.md',
],
},
{
text: 'Cookbook',
children: [
'/zh/advanced/cookbook/README.md',
'/zh/advanced/cookbook/usage-of-client-app-enhance.md',
'/zh/advanced/cookbook/adding-extra-pages.md',
'/zh/advanced/cookbook/making-a-theme-extendable.md',
'/zh/advanced/cookbook/passing-data-to-client-code.md',
'/zh/advanced/cookbook/markdown-and-vue-sfc.md',
],
},
],
'/zh/reference/': [
{
text: 'VuePress 参考',
collapsible: true,
children: [
'/zh/reference/cli.md',
'/zh/reference/config.md',
'/zh/reference/frontmatter.md',
'/zh/reference/components.md',
'/zh/reference/plugin-api.md',
'/zh/reference/theme-api.md',
'/zh/reference/client-api.md',
'/zh/reference/node-api.md',
],
},
{
text: '打包工具参考',
collapsible: true,
children: [
'/zh/reference/bundler/vite.md',
'/zh/reference/bundler/webpack.md',
],
},
{
text: '默认主题参考',
collapsible: true,
children: [
'/zh/reference/default-theme/config.md',
'/zh/reference/default-theme/frontmatter.md',
'/zh/reference/default-theme/components.md',
'/zh/reference/default-theme/markdown.md',
'/zh/reference/default-theme/styles.md',
'/zh/reference/default-theme/extending.md',
],
},
{
text: '官方插件参考',
collapsible: true,
children: [
{
text: '常用功能',
children: [
'/zh/reference/plugin/back-to-top.md',
'/zh/reference/plugin/container.md',
'/zh/reference/plugin/external-link-icon.md',
'/zh/reference/plugin/google-analytics.md',
'/zh/reference/plugin/medium-zoom.md',
'/zh/reference/plugin/nprogress.md',
'/zh/reference/plugin/register-components.md',
],
},
{
text: '内容搜索',
children: [
'/zh/reference/plugin/docsearch.md',
'/zh/reference/plugin/search.md',
],
},
{
text: 'PWA',
children: [
'/zh/reference/plugin/pwa.md',
'/zh/reference/plugin/pwa-popup.md',
],
},
{
text: '语法高亮',
children: [
'/zh/reference/plugin/prismjs.md',
'/zh/reference/plugin/shiki.md',
],
},
{
text: '主题开发',
children: [
'/zh/reference/plugin/active-header-links.md',
'/zh/reference/plugin/git.md',
'/zh/reference/plugin/palette.md',
'/zh/reference/plugin/theme-data.md',
'/zh/reference/plugin/toc.md',
],
},
],
},
],
}
$accentColor = #5dac38
\ No newline at end of file
{
"scripts": {
"docs:dev": "vuepress dev docs --open --host 127.0.0.1",
"docs:build": "vuepress build docs"
}
"scripts": {
"docs:dev": "vuepress dev docs --open --host 127.0.0.1",
"docs:build": "vuepress build docs"
},
"devDependencies": {
"vuepress-plugin-autometa": "^0.1.13"
},
"dependencies": {
"vuepress-plugin-sitemap": "^2.3.1"
}
\ No newline at end of file
}
Sitemap: https://dev-cloud.gitcode.host/spring/sitemap.xml
User-agent: *
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册