-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from Ares-Chang/docs/vitepress
docs: add vitepress docs website
- Loading branch information
Showing
51 changed files
with
2,526 additions
and
450 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 |
---|---|---|
|
@@ -175,3 +175,6 @@ dist_ssg | |
|
||
# Android | ||
*.keystore | ||
|
||
# Vitepress | ||
cache |
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
Large diffs are not rendered by default.
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<script setup lang="ts"> | ||
import { VPTeamMembers } from 'vitepress/theme'; | ||
const teamMembers = [ | ||
{ | ||
avatar: 'https://github.com/ModyQyW.png', | ||
name: 'ModyQyW', | ||
title: 'Author', | ||
links: [ | ||
{ icon: 'github', link: 'https://github.com/ModyQyW' }, | ||
], | ||
}, | ||
{ | ||
avatar: 'https://github.com/edwinhuish.png', | ||
name: 'edwinhuish', | ||
title: 'Maintainer', | ||
links: [ | ||
{ icon: 'github', link: 'https://github.com/edwinhuish' }, | ||
], | ||
}, | ||
]; | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<h2 style="text-align: center;"> | ||
团队成员 | ||
</h2> | ||
<VPTeamMembers size="small" :members="teamMembers" /> | ||
</div> | ||
</template> |
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 |
---|---|---|
@@ -0,0 +1,135 @@ | ||
import fg from 'fast-glob'; | ||
import { defineConfig } from 'vitepress'; | ||
|
||
const files = await fg('*', { | ||
onlyDirectories: true, | ||
cwd: './src', | ||
ignore: [ | ||
'public', | ||
'apis', | ||
'guide', | ||
], | ||
}); | ||
|
||
// https://vitepress.dev/reference/site-config | ||
export default defineConfig({ | ||
title: 'UniUse', | ||
description: 'uni-app (vue3) 组合式工具集。', | ||
lang: 'zh-CN', | ||
themeConfig: { | ||
logo: '/logo.png', | ||
|
||
nav: [ | ||
{ text: '指南', link: '/guide/' }, | ||
{ text: 'API', link: '/apis/' }, | ||
{ text: 'ChangeLog', link: 'https://github.com/uni-helper/uni-use/blob/main/CHANGELOG.md' }, | ||
], | ||
|
||
sidebar: { | ||
'/guide/': [ | ||
{ | ||
text: '指南', | ||
items: [ | ||
{ | ||
text: '开始', | ||
link: '/guide/', | ||
}, | ||
{ | ||
text: '注意事项', | ||
link: '/guide/notice/', | ||
}, | ||
{ | ||
text: '更新日志', | ||
link: 'https://github.com/uni-helper/uni-use/blob/main/CHANGELOG.md', | ||
}, | ||
{ | ||
text: '所有函数', | ||
link: '/apis/', | ||
}, | ||
], | ||
}, | ||
], | ||
'/': [ | ||
{ | ||
text: 'All Functions', | ||
items: [ | ||
{ | ||
text: '函数列表', | ||
link: '/apis/', | ||
}, | ||
], | ||
}, | ||
{ | ||
text: 'API', | ||
items: files.map(file => ({ | ||
text: file, | ||
link: `/${file}/`, | ||
})), | ||
}, | ||
], | ||
}, | ||
|
||
editLink: { | ||
pattern: 'https://github.com/uni-helper/uni-use/tree/main/src/:path', | ||
text: '为这个页面提供建议', | ||
}, | ||
|
||
footer: { | ||
message: 'Released under the MIT License.', | ||
copyright: 'Copyright © 2022-PRESENT uni-helper and uni-helper contributors', | ||
}, | ||
|
||
docFooter: { | ||
prev: '上一页', | ||
next: '下一页', | ||
}, | ||
|
||
outline: { | ||
label: '页面导航', | ||
}, | ||
|
||
search: { | ||
provider: 'local', | ||
options: { | ||
locales: { | ||
'zh-CN': { | ||
translations: { | ||
button: { | ||
buttonText: '搜索文档', | ||
buttonAriaLabel: '搜索文档', | ||
}, | ||
modal: { | ||
noResultsText: '无法找到相关结果', | ||
resetButtonTitle: '清除查询条件', | ||
footer: { | ||
selectText: '选择', | ||
navigateText: '切换', | ||
closeText: '关闭', | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
|
||
lastUpdated: { | ||
text: '最后更新于', | ||
formatOptions: { | ||
dateStyle: 'short', | ||
timeStyle: 'medium', | ||
}, | ||
}, | ||
|
||
langMenuLabel: '多语言', | ||
returnToTopLabel: '回到顶部', | ||
sidebarMenuLabel: '菜单', | ||
darkModeSwitchLabel: '主题', | ||
lightModeSwitchTitle: '切换到浅色模式', | ||
darkModeSwitchTitle: '切换到深色模式', | ||
|
||
socialLinks: [ | ||
{ icon: 'github', link: 'https://github.com/uni-helper/uni-use' }, | ||
], | ||
}, | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// https://vitepress.dev/guide/custom-theme | ||
import type { Theme } from 'vitepress'; | ||
import DefaultTheme from 'vitepress/theme'; | ||
import { h } from 'vue'; | ||
import HomeTeam from '../components/HomeTeam.vue'; | ||
import './style.css'; | ||
|
||
export default { | ||
extends: DefaultTheme, | ||
Layout: () => { | ||
return h(DefaultTheme.Layout, null, { | ||
// https://vitepress.dev/guide/extending-default-theme#layout-slots | ||
}); | ||
}, | ||
enhanceApp({ app }) { | ||
app.component('HomeTeam', HomeTeam); | ||
}, | ||
} satisfies Theme; |
Oops, something went wrong.