Skip to content

Commit dcd31fc

Browse files
author
litongjava
committed
add some plugins
1 parent 725b964 commit dcd31fc

26 files changed

+5204
-250
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -151,4 +151,6 @@ cmake-build-debug-mingw/
151151
venv/
152152
.vs/
153153
Debug/
154-
vcpkg_installed/
154+
vcpkg_installed/
155+
.temp/
156+
.cache/

docs/.vuepress/config.js

+11-17
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,20 @@
1+
import { defineUserConfig } from "vuepress/cli";
2+
import { viteBundler } from "@vuepress/bundler-vite";
3+
14
// 引入JSON文件
2-
const head = require("./config/head");
3-
const plugin = require("./config/plugins");
4-
const themeConfig = require("./config/themeConfig");
5-
const webpack = require("webpack");
6-
module.exports = {
5+
import head from "./config/head";
6+
import plugins from "./config/plugins";
7+
import themeConfig from "./config/themeConfig";
8+
export default defineUserConfig({
79
base: "/",
810
title: "Tio Boot Docs",
911
description: "Java 高性能Web 快速开发框架",
1012
head: head,
11-
plugins: plugin,
13+
plugins: plugins,
1214

1315
markdown: {
1416
lineNumbers: true,
1517
},
16-
themeConfig: themeConfig,
17-
configureWebpack: {
18-
plugins: [
19-
new webpack.DefinePlugin({
20-
"process.env.CLIENT_ID": JSON.stringify(process.env.CLIENT_ID),
21-
"process.env.CLIENT_SECRET": JSON.stringify(process.env.CLIENT_SECRET),
22-
"process.env.GA": JSON.stringify(process.env.GA),
23-
}),
24-
],
25-
},
26-
};
18+
theme: themeConfig,
19+
bundler: viteBundler(),
20+
});

docs/.vuepress/config/head.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = [
1+
export default [
22
["link", { rel: "stylesheet", href: "/prism-theme.css" }],
33
["link", { rel: "icon", href: "/logo.png" }],
44
["link", { rel: "manifest", href: "/manifest.json" }],

docs/.vuepress/config/nav-en.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export default ["/", "/about"];

docs/.vuepress/config/nav-en.json

-34
This file was deleted.

docs/.vuepress/config/plugins.js

+9-45
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,10 @@
1-
require("dotenv").config();
2-
module.exports = [
3-
[
4-
"@vuepress/pwa",
5-
{
6-
serviceWorker: true,
7-
updatePopup: {
8-
"/": {
9-
message: "New content is available.",
10-
buttonText: "Refresh",
11-
},
12-
"/zh/": {
13-
message: "发现新内容可用",
14-
buttonText: "刷新",
15-
},
16-
},
17-
},
18-
],
19-
[
20-
"@vssue/vuepress-plugin-vssue",
21-
{
22-
platform: "github-v4",
23-
owner: "litongjava",
24-
repo: "jfinal-doc",
25-
clientId: process.env.CLIENT_ID,
26-
clientSecret: process.env.CLIENT_SECRET,
27-
autoCreateIssue: true,
28-
},
29-
],
30-
["@vuepress/back-to-top"],
31-
[
32-
"@vuepress/google-analytics",
33-
{
34-
ga: process.env.GA,
35-
},
36-
],
37-
["@vuepress/medium-zoom"],
38-
["@vuepress/active-header-links"],
39-
["fulltext-search"],
40-
[
41-
"vuepress-plugin-code-copy",
42-
{
43-
staticIcon: true,
44-
},
45-
],
1+
import { searchPlugin } from "@vuepress/plugin-search";
2+
import { pwaPlugin } from "@vuepress/plugin-pwa";
3+
import { seoPlugin } from "@vuepress/plugin-seo";
4+
export default [
5+
searchPlugin({}),
6+
pwaPlugin({}),
7+
seoPlugin({
8+
// 选项
9+
}),
4610
];

0 commit comments

Comments
 (0)