Skip to content

Commit fc8b886

Browse files
committed
[vuepress] Update config
Signed-off-by: Kang Huaishuai <[email protected]>
1 parent ff1f48a commit fc8b886

File tree

5 files changed

+63
-22
lines changed

5 files changed

+63
-22
lines changed

.github/workflows/ci.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,13 @@ jobs:
2121
sudo rm -rf _book
2222
npm i vuepress --save-dev
2323
npm i
24-
npm run vuepress:build || true
24+
25+
git clone https://github.com/docker-practice/.vuepress .vuepress2
26+
cp -r .vuepress2/. .vuepress/
27+
rm -rf .vuepress2
28+
find . \( -path "./mesos" -o -path "./machine" -o -path "./swarm_mode" -o -path "./node_modules" -o -path "./.vuepress" -o -path "./_book" -o -path "./CHANGELOG.md" -o -path "./CONTRIBUTING.md" \) -prune -o -name "*.md" -exec sed -i 'N;2a\<AdSenseTitle/>\n' {} \;
29+
30+
npm run vuepress:build
2531
echo "vuepress.docker-practice.com" > .vuepress/dist/CNAME
2632
2733
cp -r _images .vuepress/dist
@@ -39,7 +45,7 @@ jobs:
3945
cp -r mesos/_images .vuepress/dist/mesos
4046
cp -r underly/_images .vuepress/dist/underly
4147
42-
echo "include: [_images]" > .vuepress/dist/_config
48+
echo "include: [_images]" > .vuepress/dist/_config.yml
4349
- name: Upload Vuepress dist
4450
uses: docker://pcit/pages
4551
if: github.repository == 'docker-practice/docker_practice'

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,3 @@ _book/
99

1010
node_modules/
1111
package-lock.json
12-
13-
.vuepress/dist

.vuepress/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/*
2+
!.gitignore
3+
!config.js

.vuepress/config.js

Lines changed: 47 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
11
const resolve = require("vuepress-theme-hope/resolve");
22

33
module.exports = resolve({
4-
themeConfig: {
5-
blog: false,
6-
comment: {
7-
type: "disable", // 使用 Valine
8-
appId: "...", // your appId
9-
appKey: "...", // your appKey
10-
},
11-
pageInfo: false
12-
},
134
title: 'Docker 从入门到实践',
145
base: '/',
156
head: [['script', {}, `
@@ -39,13 +30,57 @@ module.exports = resolve({
3930
]
4031
],
4132
plugins: {
42-
sitemap: {
43-
hostname: 'https://vuepress.mirror.docker-practice.com'
44-
},
33+
// sitemap: {
34+
// hostname: 'https://vuepress.mirror.docker-practice.com'
35+
// },
36+
// 'git-log': {
37+
// additionalArgs: '--no-merge',
38+
// onlyFirstAndLastCommit: true,
39+
// },
4540
},
4641
themeConfig: {
42+
blog: false,
43+
// comment: false,
44+
comment: {
45+
type: "disable", // 使用 Valine
46+
appId: "...", // your appId
47+
appKey: "...", // your appKey
48+
},
49+
pageInfo: [
50+
// 'Author',
51+
'ReadTime',
52+
'Word',
53+
],
54+
footer: {
55+
content: "",
56+
display: true,
57+
copyright: false,
58+
},
59+
searchPlaceholder: 'Search',
60+
repo: 'yeasy/docker_practice',
61+
repoLabel: 'GitHub',
62+
hostname: 'https://vuepress.mirror.docker-practice.com',
63+
// author: 'yeasy',
64+
markdown: {
65+
// lineNumbers: true,
66+
// sub: true,
67+
// footnote: true
68+
enableAll: true
69+
},
70+
themeColor: {
71+
blue: '#2196f3',
72+
red: '#f26d6d',
73+
green: '#3eaf7c',
74+
orange: '#fb9b5f'
75+
},
76+
77+
//
78+
79+
showAds: true,
80+
4781
docsRepo: 'yeasy/docker_practice',
4882
docsDir: '/',
83+
docsBranch: 'master',
4984
editLinks: true,
5085
nav: [
5186
{

package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55
"main": "index.js",
66
"dependencies": {},
77
"devDependencies": {
8-
"chalk": "^3.0.0",
9-
"commander": "^4.0.1",
10-
"esm": "^3.2.25",
11-
"vuepress-plugin-container": "^2.1.2",
12-
"vuepress-plugin-sitemap": "^2.3.1",
13-
"vuepress-theme-hope": "^0.7.3"
8+
"chalk": "^2.4.2",
9+
"commander": "^2.0.0",
10+
"esm": "^3.0.0",
11+
"vuepress-plugin-container": "^2.1.5",
12+
"vuepress-theme-hope": "^0.8.0"
1413
},
1514
"scripts": {
1615
"test": "echo \"Error: no test specified\" && exit 1",

0 commit comments

Comments
 (0)