From 83929dd0963824dea8f57db9dfbdcde35db186db Mon Sep 17 00:00:00 2001 From: Kang Huaishuai Date: Wed, 16 Sep 2020 18:05:52 +0800 Subject: [PATCH] [vuepress] support dark mode, close #463 Signed-off-by: Kang Huaishuai --- .github/workflows/ci.yaml | 2 +- .vuepress/config.js | 15 +++++++++++++-- image/dockerfile/env.md | 2 +- package.json | 3 ++- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cb310cb..f841d74 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -21,7 +21,7 @@ jobs: sudo rm -rf _book npm i vuepress --save-dev npm i - npm run vuepress:build + npm run vuepress:build || true echo "vuepress.docker-practice.com" > .vuepress/dist/CNAME cp -r _images .vuepress/dist diff --git a/.vuepress/config.js b/.vuepress/config.js index 876a244..75ec2c5 100644 --- a/.vuepress/config.js +++ b/.vuepress/config.js @@ -1,4 +1,15 @@ -module.exports = { +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', {}, ` @@ -401,4 +412,4 @@ module.exports = { ], }, } -} +}); diff --git a/image/dockerfile/env.md b/image/dockerfile/env.md index f3d4430..eba9eae 100644 --- a/image/dockerfile/env.md +++ b/image/dockerfile/env.md @@ -7,7 +7,7 @@ 这个指令很简单,就是设置环境变量而已,无论是后面的其它指令,如 `RUN`,还是运行时的应用,都可以直接使用这里定义的环境变量。 -```Dockerfie +```docker ENV VERSION=1.0 DEBUG=on \ NAME="Happy Feet" ``` diff --git a/package.json b/package.json index 66a88fc..5e9a381 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "commander": "^4.0.1", "esm": "^3.2.25", "vuepress-plugin-container": "^2.1.2", - "vuepress-plugin-sitemap": "^2.3.1" + "vuepress-plugin-sitemap": "^2.3.1", + "vuepress-theme-hope": "^0.7.3" }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1",