[vuepress] Update config

Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
1.2.0
Kang Huaishuai 2020-10-13 22:24:30 +08:00
parent ff1f48a793
commit fc8b8867af
No known key found for this signature in database
GPG Key ID: 5E515022F565DA09
5 changed files with 63 additions and 22 deletions

View File

@ -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\<AdSenseTitle/>\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'

2
.gitignore vendored
View File

@ -9,5 +9,3 @@ _book/
node_modules/
package-lock.json
.vuepress/dist

3
.vuepress/.gitignore vendored 100644
View File

@ -0,0 +1,3 @@
/*
!.gitignore
!config.js

View File

@ -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: [
{

View File

@ -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",