diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f841d74..10afc2b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -21,7 +21,13 @@ jobs: sudo rm -rf _book npm i vuepress --save-dev npm i - npm run vuepress:build || true + + git clone https://github.com/docker-practice/.vuepress .vuepress2 + cp -r .vuepress2/. .vuepress/ + rm -rf .vuepress2 + 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\\n' {} \; + + npm run vuepress:build echo "vuepress.docker-practice.com" > .vuepress/dist/CNAME cp -r _images .vuepress/dist @@ -39,7 +45,7 @@ jobs: cp -r mesos/_images .vuepress/dist/mesos cp -r underly/_images .vuepress/dist/underly - echo "include: [_images]" > .vuepress/dist/_config + echo "include: [_images]" > .vuepress/dist/_config.yml - name: Upload Vuepress dist uses: docker://pcit/pages if: github.repository == 'docker-practice/docker_practice' diff --git a/.gitignore b/.gitignore index 4d19753..cd6ce1c 100644 --- a/.gitignore +++ b/.gitignore @@ -9,5 +9,3 @@ _book/ node_modules/ package-lock.json - -.vuepress/dist diff --git a/.vuepress/.gitignore b/.vuepress/.gitignore new file mode 100644 index 0000000..c01fe45 --- /dev/null +++ b/.vuepress/.gitignore @@ -0,0 +1,3 @@ +/* +!.gitignore +!config.js diff --git a/.vuepress/config.js b/.vuepress/config.js index 75ec2c5..6c5dacd 100644 --- a/.vuepress/config.js +++ b/.vuepress/config.js @@ -1,15 +1,6 @@ const resolve = require("vuepress-theme-hope/resolve"); module.exports = resolve({ - themeConfig: { - blog: false, - comment: { - type: "disable", // 使用 Valine - appId: "...", // your appId - appKey: "...", // your appKey - }, - pageInfo: false - }, title: 'Docker 从入门到实践', base: '/', head: [['script', {}, ` @@ -39,13 +30,57 @@ module.exports = resolve({ ] ], plugins: { - sitemap: { - hostname: 'https://vuepress.mirror.docker-practice.com' - }, + // sitemap: { + // hostname: 'https://vuepress.mirror.docker-practice.com' + // }, + // 'git-log': { + // additionalArgs: '--no-merge', + // onlyFirstAndLastCommit: true, + // }, }, themeConfig: { + blog: false, + // comment: false, + comment: { + type: "disable", // 使用 Valine + appId: "...", // your appId + appKey: "...", // your appKey + }, + pageInfo: [ + // 'Author', + 'ReadTime', + 'Word', + ], + footer: { + content: "", + display: true, + copyright: false, + }, + searchPlaceholder: 'Search', + repo: 'yeasy/docker_practice', + repoLabel: 'GitHub', + hostname: 'https://vuepress.mirror.docker-practice.com', + // author: 'yeasy', + markdown: { + // lineNumbers: true, + // sub: true, + // footnote: true + enableAll: true + }, + themeColor: { + blue: '#2196f3', + red: '#f26d6d', + green: '#3eaf7c', + orange: '#fb9b5f' + }, + + // + + showAds: true, + docsRepo: 'yeasy/docker_practice', docsDir: '/', + docsBranch: 'master', editLinks: true, nav: [ { diff --git a/package.json b/package.json index 5e9a381..9dbf99c 100644 --- a/package.json +++ b/package.json @@ -5,12 +5,11 @@ "main": "index.js", "dependencies": {}, "devDependencies": { - "chalk": "^3.0.0", - "commander": "^4.0.1", - "esm": "^3.2.25", - "vuepress-plugin-container": "^2.1.2", - "vuepress-plugin-sitemap": "^2.3.1", - "vuepress-theme-hope": "^0.7.3" + "chalk": "^2.4.2", + "commander": "^2.0.0", + "esm": "^3.0.0", + "vuepress-plugin-container": "^2.1.5", + "vuepress-theme-hope": "^0.8.0" }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1",