Skip to content

Commit 1a82a58

Browse files
authored
Merge pull request #742 from liuxinyumocn/fix/docs0417
Fix/docs0417
2 parents 32df281 + 7e80802 commit 1a82a58

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

.config/.vitepress/config.mts

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { fileURLToPath, URL } from 'node:url'
12
import { defineConfig } from "vitepress";
23

34
// https://vitepress.dev/reference/site-config

.config/node/gird.js

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const fs = require("fs");
2+
const path = require("path");
3+
const root = process.cwd();
4+
const vpPath = path.resolve(
5+
root,
6+
"./node_modules/vitepress/dist/client/theme-default/components/VPFeatures.vue"
7+
);
8+
if (fs.existsSync(vpPath)) {
9+
let content = fs.readFileSync(vpPath, { encoding: "utf-8" });
10+
content = content.replace(`return 'grid-4'`, `return 'grid-6'`);
11+
fs.rmSync(vpPath);
12+
fs.writeFileSync(vpPath, content, { encoding: "utf-8" });
13+
}

.github/workflows/node.js.yml

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
- name: Build
3131
run: |
3232
rm -rf Demo
33+
node .config/node/gird.js
3334
npm run docs:build
3435
mkdir ./docs/image
3536
cp -r ./image/* ./docs/image/

0 commit comments

Comments
 (0)