-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
289 additions
and
452 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,55 @@ | ||
import config from './config/index' | ||
import { fileURLToPath, URL } from 'node:url' | ||
import { demoPreviewPlugin } from '@vitepress-code-preview/plugin' | ||
import nav from './config/nav' | ||
import sidebar from './config/sidebar' | ||
|
||
export default config | ||
export default ({ mode }) => { | ||
const basePath = mode === 'development' ? '/' : '/ccui/' | ||
|
||
return { | ||
base: basePath, | ||
lang: 'en-ZH', | ||
title: 'vue3-ccui', | ||
description: 'vue3-ccui 组件库', | ||
lastUpdated: true, | ||
ignoreDeadLinks: true, // 忽略死链接 | ||
head: [ | ||
// 这里的路径没有被自动更改 手动更改路径 | ||
[ | ||
'link', | ||
{ rel: 'icon', type: 'image/svg+xml', href: `${basePath}logo.svg` }, | ||
], | ||
[ | ||
'link', | ||
{ | ||
rel: 'stylesheet', | ||
href: 'https://unpkg.com/vue3-ccui/theme/darkTheme.css', | ||
}, | ||
], | ||
], | ||
markdown: { | ||
config(md) { | ||
const docRoot = fileURLToPath(new URL('../', import.meta.url)) | ||
md.use(demoPreviewPlugin, { docRoot }) | ||
}, | ||
}, | ||
themeConfig: { | ||
sidebar, | ||
nav, | ||
logo: '/logo.svg', | ||
algolia: { | ||
appId: 'K0NNJA38K6', | ||
apiKey: '0b6d20552d2073390d2bbb0a84fb49dd', | ||
indexName: 'ccui', | ||
}, | ||
socialLinks: [ | ||
{ icon: 'github', link: 'https://github.com/vaebe/ccui.git' }, | ||
], | ||
outlineTitle: '快速前往', | ||
footer: { | ||
message: 'Released under the MIT License.', | ||
copyright: 'Copyright © 2022-present vaebe', | ||
}, | ||
}, | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
import DemoPreview, { useComponents } from '@vitepress-code-preview/container' | ||
import DefaultTheme from 'vitepress/theme' | ||
import ccui from '../../../ui/vue-ccui' | ||
import { useComponents } from './useComponents' | ||
import 'vitepress-theme-demoblock/dist/theme/styles/index.css' | ||
import './styles/index.scss' | ||
import '@vitepress-code-preview/container/dist/style.css' | ||
|
||
export default { | ||
...DefaultTheme, | ||
enhanceApp(ctx) { | ||
DefaultTheme.enhanceApp(ctx) | ||
|
||
ctx.app.use(ccui) | ||
useComponents(ctx.app) | ||
|
||
useComponents(ctx.app, DemoPreview) | ||
}, | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
|
||
## 基本用法 | ||
|
||
:::demo 基本用法 | ||
:::demo | ||
|
||
```vue | ||
<script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.