Skip to content

Commit

Permalink
feat: config
Browse files Browse the repository at this point in the history
  • Loading branch information
liyuan97 committed Feb 1, 2024
1 parent bf5c447 commit 43a4c0e
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 2 deletions.
11 changes: 9 additions & 2 deletions docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { defineUserConfig } from 'vuepress'
import type { Plugin } from '@vuepress/core'
import { viteBundler } from '@vuepress/bundler-vite'
import { getDirname, path } from '@vuepress/utils'
import { registerComponentsPlugin } from '@vuepress/plugin-register-components'
import { containerPlugin } from '@vuepress/plugin-container'
import fullTextSearchPlugin from 'vuepress-plugin-full-text-search2'
import codeCopyPlugin from '@snippetors/vuepress-plugin-code-copy'
import microAppTheme from './theme'
import { navbar as navbarZh, sidebarZh } from './configs'

Expand Down Expand Up @@ -32,7 +32,8 @@ export default defineUserConfig({
repo: 'https://github.com/micro-zoe/micro-app',

/* edit doc */
// docsBranch: 'doc',
docsRepo: 'https://github.com/CrystalAngelLee/micro-app-docs',
docsBranch: 'master',
docsDir: 'docs',
/* edit doc */

Expand Down Expand Up @@ -96,6 +97,12 @@ export default defineUserConfig({
defaultInfo: 'Note'
}
}
}),
/** @see: https://snippetors.github.io/plugins/vuepress-plugin-code-copy.html */
codeCopyPlugin({
align: 'top',
color: '#3eaf7c',
backgroundTransition: false
})
]
})
16 changes: 16 additions & 0 deletions docs/.vuepress/styles/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.custom-container.note {
border-color: #17a2b8;
background-color: var(--c-tip-bg);
color: var(--c-tip-text);

.custom-container-title {
color: var(--c-tip-title);
}
}

.custom-container.note {
padding: 0.1rem 1.5rem;
border-left-width: 0.5rem;
border-left-style: solid;
margin: 1rem 0;
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
},
"devDependencies": {
"@micro-zoe/micro-app": "^1.0.0-rc.3",
"@snippetors/vuepress-plugin-code-copy": "^1.2.3",
"@vuepress/bundler-vite": "2.0.0-rc.2",
"@vuepress/plugin-register-components": "^2.0.0-rc.3",
"@vuepress/theme-default": "2.0.0-rc.2",
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,11 @@
resolved "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-1.0.0.tgz#9cd84cc15bc865a5ca35fcaae198eb899f7b5c90"
integrity sha512-rUV5WyJrJLoloD4NDN1V1+LDMDWOa4OTsT4yYJwQNpTU6FWxkxHpL7eu4w+DmiH8x/EAM1otkPE1+LaspIbplw==

"@snippetors/vuepress-plugin-code-copy@^1.2.3":
version "1.2.3"
resolved "https://registry.npmjs.org/@snippetors/vuepress-plugin-code-copy/-/vuepress-plugin-code-copy-1.2.3.tgz#4cc5f7ef7530ff6654786f6baa2e15ca4ffb8b14"
integrity sha512-PiUbhlYseY4UqsE/ike/Up27GkrbHvR7OJqV5nlmHEW141uWcrVaBZsBS870ckqNF+vd2fk8g4TyoiHvxaUzSg==

"@types/debug@^4.1.12":
version "4.1.12"
resolved "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz#a155f21690871953410df4b6b6f53187f0500917"
Expand Down

0 comments on commit 43a4c0e

Please sign in to comment.