88 lines
3.2 KiB
JavaScript
88 lines
3.2 KiB
JavaScript
/*
|
|
* @LastEditTime: 2023-11-01 14:10:24
|
|
* @Description: ...
|
|
* @Date: 2023-09-19 19:04:57
|
|
* @Author: isboyjc
|
|
* @LastEditors: isboyjc
|
|
*/
|
|
import { defineConfig } from 'vitepress'
|
|
import {logo, description, title, me, keywords, ico, site, icp, publicSecurityFiling, mail} from './meta'
|
|
import {icons} from "./icon"
|
|
|
|
// https://vitepress.dev/reference/site-config
|
|
export default defineConfig({
|
|
title,
|
|
description,
|
|
locales: {
|
|
root: { label: '简体中文', lang: 'zh-CN' },
|
|
},
|
|
markdown: {
|
|
lineNumbers: true,
|
|
},
|
|
head: [
|
|
['meta', { name: 'referrer', content: 'no-referrer-when-downgrade' }],
|
|
['meta', { name: 'keywords', content: keywords }],
|
|
['meta', { name: 'author', content: me.name }],
|
|
['meta', { name: 'application-name', content: title }],
|
|
['meta', { name: 'apple-mobile-web-app-title', content: title }],
|
|
['meta', { name: 'apple-mobile-web-app-status-bar-style', content: 'default' }],
|
|
|
|
['link', { rel: 'shortcut icon', href: ico }],
|
|
['link', { rel: 'icon', type: 'image/x-icon', href: ico }],
|
|
// ['link', { rel: 'mask-icon', href: '.svg', color: '#06f' }],
|
|
// ['meta', { name: 'theme-color', content: '#06f' }],
|
|
|
|
// webfont
|
|
['link', { rel: 'dns-prefetch', href: 'https://fonts.googleapis.com' }],
|
|
['link', { rel: 'dns-prefetch', href: 'https://fonts.gstatic.com' }],
|
|
['link', { rel: 'preconnect', crossorigin: 'anonymous', href: 'https://fonts.googleapis.com' }],
|
|
['link', { rel: 'preconnect', crossorigin: 'anonymous', href: 'https://fonts.gstatic.com' }],
|
|
|
|
// og
|
|
['meta', { property: 'og:type', content: 'website' }],
|
|
['meta', { property: 'og:description', content: description }],
|
|
['meta', { property: 'og:url', content: site }],
|
|
['meta', { property: 'og:locale', content: 'zh_CN' }],
|
|
],
|
|
themeConfig: {
|
|
logo,
|
|
outline: 'deep',
|
|
outlineTitle: '目录...',
|
|
returnToTopLabel: '返回顶部',
|
|
darkModeSwitchLabel: '模式',
|
|
sidebarMenuLabel: '归档',
|
|
lastUpdatedText:"最后更新时间",
|
|
docFooter: {
|
|
prev: '上一页',
|
|
next: '下一页',
|
|
},
|
|
|
|
nav: [
|
|
// { text: '首页', link: '/' },
|
|
{ text: '关于我们', link: '/about' },
|
|
{ text: '岛屿文档', link: '/docs' },
|
|
{ text: '在线支持', link: '/support' }
|
|
],
|
|
|
|
// sidebar: [
|
|
// {
|
|
// text: 'Examples',
|
|
// items: [
|
|
// { text: 'Markdown Examples', link: '/markdown-examples' },
|
|
// { text: 'Runtime API Examples', link: '/api-examples' }
|
|
// ]
|
|
// }
|
|
// ],
|
|
socialLinks: [
|
|
{ icon: icons.mail, link: `Mailto:${mail}` }
|
|
],
|
|
|
|
footer: {
|
|
message: `<a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=${publicSecurityFiling}" style="display:inline-block;text-decoration:none;height:20px;line-height:20px;color: var(--vp-c-brand);">
|
|
<img src="/img/site/psf.png" style="float:left;"/><span> 京公网安备 ${publicSecurityFiling}号</span>
|
|
</a> <a target="_blank" href="https://beian.miit.gov.cn/#/Integrated/index" style="color: var(--vp-c-brand);">${icp}</a>`,
|
|
copyright: `© 2023-${new Date().getFullYear()} ${title}`
|
|
},
|
|
}
|
|
})
|