签入版本
This commit is contained in:
@@ -0,0 +1,99 @@
|
||||
import { defineConfig, HeadConfig } from "vitepress";
|
||||
|
||||
export const META_IMAGE = "/logo.png";
|
||||
|
||||
const rControl = /[\u0000-\u001f]/g;
|
||||
const rSpecial = /[\s~`!@#$%^&*()\-_+=[\]{}|\\;:"'“”‘’<>,.?/]+/g;
|
||||
const rCombining = /[\u0300-\u036F]/g;
|
||||
|
||||
/**
|
||||
* Default slugification function
|
||||
*/
|
||||
export const slugify = (str: string): string =>
|
||||
str
|
||||
.normalize("NFKD")
|
||||
// Remove accents
|
||||
.replace(rCombining, "")
|
||||
// Remove control characters
|
||||
.replace(rControl, "")
|
||||
// Replace special characters
|
||||
.replace(rSpecial, "-")
|
||||
// ensure it doesn't start with a number
|
||||
.replace(/^(\d)/, "_$1");
|
||||
|
||||
export const sharedConfig = defineConfig({
|
||||
title: "EasyGoAdmin",
|
||||
appearance: "light",
|
||||
|
||||
markdown: {
|
||||
theme: {
|
||||
dark: "dracula-soft",
|
||||
light: "vitesse-light",
|
||||
},
|
||||
|
||||
attrs: {
|
||||
leftDelimiter: "%{",
|
||||
rightDelimiter: "}%",
|
||||
},
|
||||
|
||||
anchor: {
|
||||
slugify,
|
||||
},
|
||||
},
|
||||
|
||||
head: [
|
||||
["link", { rel: "icon", type: "image/svg+xml", href: "/logo.svg" }],
|
||||
["link", { rel: "icon", type: "image/png", href: "/logo.png" }],
|
||||
|
||||
[
|
||||
"meta",
|
||||
{
|
||||
property: "og:type",
|
||||
content: "website",
|
||||
},
|
||||
],
|
||||
|
||||
[
|
||||
"meta",
|
||||
{
|
||||
property: "twitter:card",
|
||||
content: "summary_large_image",
|
||||
},
|
||||
],
|
||||
[
|
||||
"meta",
|
||||
{
|
||||
property: "twitter:image",
|
||||
content: META_IMAGE,
|
||||
},
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
themeConfig: {
|
||||
logo: "/logo.svg",
|
||||
outline: [2, 3],
|
||||
|
||||
socialLinks: [
|
||||
{
|
||||
icon: "github",
|
||||
link: "https://gitee.com/easygoadmin/EasyGoAdmin_GoFrame_EleVue",
|
||||
},
|
||||
],
|
||||
|
||||
footer: {
|
||||
copyright:
|
||||
"Copyright © 2026 www.easygoadmin.vip. Apache-2.0 Licensed.",
|
||||
message: "EasyGoAdmin · GoFrame+ElementPlus 开发文档",
|
||||
},
|
||||
|
||||
editLink: {
|
||||
pattern: "https://gitee.com/easygoadmin/EasyGoAdmin_GoFrame_EleVue",
|
||||
text: "对本页提出修改建议",
|
||||
},
|
||||
|
||||
search: {
|
||||
provider: "local",
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user