Skip to content

Commit

Permalink
feat: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Feb 6, 2024
1 parent 9724922 commit fcf8475
Show file tree
Hide file tree
Showing 12 changed files with 69 additions and 261 deletions.
52 changes: 0 additions & 52 deletions docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { createRequire } from 'node:module'
import process from 'node:process'
import { viteBundler } from '@vuepress/bundler-vite'
import { webpackBundler } from '@vuepress/bundler-webpack'
import { docsearchPlugin } from '@vuepress/plugin-docsearch'
import { registerComponentsPlugin } from '@vuepress/plugin-register-components'
import { defineUserConfig } from 'vuepress'
import { getDirname, path } from 'vuepress/utils'
Expand Down Expand Up @@ -61,57 +60,6 @@ export default defineUserConfig({

// use plugins
plugins: [
docsearchPlugin({
appId: '34YFD9IUQ2',
apiKey: '9a9058b8655746634e01071411c366b8',
indexName: 'vuepress',
searchParameters: {
facetFilters: ['tags:v2'],
},
locales: {
'/zh/': {
placeholder: '搜索文档',
translations: {
button: {
buttonText: '搜索文档',
buttonAriaLabel: '搜索文档',
},
modal: {
searchBox: {
resetButtonTitle: '清除查询条件',
resetButtonAriaLabel: '清除查询条件',
cancelButtonText: '取消',
cancelButtonAriaLabel: '取消',
},
startScreen: {
recentSearchesTitle: '搜索历史',
noRecentSearchesText: '没有搜索历史',
saveRecentSearchButtonTitle: '保存至搜索历史',
removeRecentSearchButtonTitle: '从搜索历史中移除',
favoriteSearchesTitle: '收藏',
removeFavoriteSearchButtonTitle: '从收藏中移除',
},
errorScreen: {
titleText: '无法获取结果',
helpText: '你可能需要检查你的网络连接',
},
footer: {
selectText: '选择',
navigateText: '切换',
closeText: '关闭',
searchByText: '搜索提供者',
},
noResultsScreen: {
noResultsText: '无法找到相关结果',
suggestedQueryText: '你可以尝试查询',
reportMissingResultsText: '你认为该查询应该有结果?',
reportMissingResultsLinkText: '点击反馈',
},
},
},
},
},
}),
registerComponentsPlugin({
componentsDir: path.resolve(__dirname, './components'),
}),
Expand Down
7 changes: 7 additions & 0 deletions docs/.vuepress/configs/navbar/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,12 @@ export const enNavbar = navbar([
children: [
{
text: 'Default Theme',
icon: 'fa6-solid:palette',
link: 'https://ecosystem.vuejs.press/themes/default/',
},
{
text: 'Plugins',
icon: 'fa6-solid:puzzle-piece',
link: 'https://ecosystem.vuejs.press/plugins/',
},
],
Expand All @@ -77,6 +79,7 @@ export const enNavbar = navbar([
'theme',
{
text: 'Cookbook',
icon: 'fa6-solid:signs-post',
link: 'cookbook/',
},
],
Expand All @@ -86,14 +89,17 @@ export const enNavbar = navbar([
children: [
{
text: 'Ecosystem',
icon: 'fa6-solid:leaf',
link: 'https://ecosystem.vuejs.press/',
},
{
text: 'MarketPlace',
icon: 'fa6-solid:cart-shopping',
link: 'https://marketplace.vuejs.press',
},
{
text: 'Contributing Guide',
icon: 'fa6-solid:signs-post',
link: 'https://github.com/vuepress/core/blob/main/CONTRIBUTING.md',
},
],
Expand All @@ -106,6 +112,7 @@ export const enNavbar = navbar([
children: [
{
text: 'Changelog',
icon: 'fa6-solid:clock',
link: 'https://github.com/vuepress/vuepress-next/blob/main/CHANGELOG.md',
},
{
Expand Down
7 changes: 7 additions & 0 deletions docs/.vuepress/configs/navbar/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,12 @@ export const zhNavbar = navbar([
children: [
{
text: '默认主题',
icon: 'fa6-solid:palette',
link: 'https://ecosystem.vuejs.press/zh/themes/default/',
},
{
text: '插件',
icon: 'fa6-solid:puzzle-piece',
link: 'https://ecosystem.vuejs.press/zh/plugins/',
},
],
Expand All @@ -72,6 +74,7 @@ export const zhNavbar = navbar([
'theme',
{
text: 'Cookbook',
icon: 'fa6-solid:signs-post',
link: 'cookbook/',
},
],
Expand All @@ -81,14 +84,17 @@ export const zhNavbar = navbar([
children: [
{
text: '生态系统',
icon: 'fa6-solid:leaf',
link: 'https://ecosystem.vuejs.press/zh/',
},
{
text: '市场',
icon: 'fa6-solid:cart-shopping',
link: 'https://marketplace.vuejs.press/zh/',
},
{
text: '贡献指南',
icon: 'fa6-solid:signs-post',
link: 'https://github.com/vuepress/core/blob/main/CONTRIBUTING_zh.md',
},
],
Expand All @@ -101,6 +107,7 @@ export const zhNavbar = navbar([
children: [
{
text: '更新日志',
icon: 'fa6-solid:clock',
link: 'https://github.com/vuepress/vuepress-next/blob/main/CHANGELOG.md',
},
{
Expand Down
36 changes: 16 additions & 20 deletions docs/.vuepress/configs/sidebar/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,19 @@ import { sidebar } from 'vuepress-theme-hope'

export const enSidebar = sidebar({
'/guide/': [
{
text: 'Guide',
children: [
'introduction',
'getting-started',
'configuration',
'page',
'markdown',
'assets',
'i18n',
'deployment',
'theme',
'plugin',
'bundler',
'migration',
'troubleshooting',
],
},
'introduction',
'getting-started',
'configuration',
'page',
'markdown',
'assets',
'i18n',
'deployment',
'theme',
'plugin',
'bundler',
'migration',
'troubleshooting',
],
'/advanced/': [
{
Expand Down Expand Up @@ -66,10 +61,11 @@ export const enSidebar = sidebar({
},
{
text: 'Ecosystem',
icon: 'fa6-solid:leaf',
children: [
{
text: 'Default Theme',
icon: 'fa6-solid:leaf',
icon: 'fa6-solid:palette',
link: 'https://ecosystem.vuejs.press/themes/default/',
},
{
Expand All @@ -78,7 +74,7 @@ export const enSidebar = sidebar({
link: 'https://ecosystem.vuejs.press/plugins/',
},
{
text: 'VuePress MarketPlace',
text: 'MarketPlace',
icon: 'fa6-solid:cart-shopping',
link: 'https://marketplace.vuejs.press',
},
Expand Down
31 changes: 13 additions & 18 deletions docs/.vuepress/configs/sidebar/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,19 @@ import { sidebar } from 'vuepress-theme-hope'

export const zhSidebar = sidebar({
'/zh/guide/': [
{
text: '指南',
children: [
'introduction',
'getting-started',
'configuration',
'page',
'markdown',
'assets',
'i18n',
'deployment',
'theme',
'plugin',
'bundler',
'migration',
'troubleshooting',
],
},
'introduction',
'getting-started',
'configuration',
'page',
'markdown',
'assets',
'i18n',
'deployment',
'theme',
'plugin',
'bundler',
'migration',
'troubleshooting',
],
'/zh/advanced/': [
{
Expand Down
6 changes: 2 additions & 4 deletions docs/.vuepress/styles/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
scroll-behavior: smooth;
}

@media (min-width: 751px) {
#docsearch-container:lang(zh-CN) {
min-width: 184.66px;
}
.icon {
font-size: 0.9em !important;
}
12 changes: 10 additions & 2 deletions docs/.vuepress/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default hopeTheme({
footer:
'Theme by <a href="https://theme-hope.vuejs.press" target="_blank">VuePress Theme Hope</a>',

copyright: 'MIT Licensed | Copyright © 2018-present Evan You',
copyright: 'MIT Licensed | Copyright © 2018-present VuePress Community',

displayFooter: true,

Expand All @@ -43,7 +43,7 @@ export default hopeTheme({
footer:
'主题使用 <a href="https://theme-hope.vuejs.press/zh/" target="_blank">VuePress Theme Hope</a>',

copyright: 'MIT 协议 | 版权所有 © 2018-至今 尤雨溪',
copyright: 'MIT 协议 | 版权所有 © 2018-至今 VuePress 社区',

displayFooter: true,

Expand All @@ -55,6 +55,14 @@ export default hopeTheme({
},

plugins: {
docsearch: {
appId: '34YFD9IUQ2',
apiKey: '9a9058b8655746634e01071411c366b8',
indexName: 'vuepress',
searchParameters: {
facetFilters: ['tags:v2'],
},
},
mdEnhance: {
codetabs: true,
},
Expand Down
3 changes: 3 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ icon: fa6-solid:house
heroImage: /images/hero.png
actions:
- text: Get Started
icon: fa6-solid:lightbulb
link: /guide/getting-started.html
type: primary
- text: Introduction
icon: fa6-solid:circle-info
link: /guide/introduction.html
type: secondary
- text: Marketplace
icon: fa6-solid:cart-shopping
link: https://marketplace.vuejs.press/
type: secondary
features:
Expand Down
4 changes: 4 additions & 0 deletions docs/guide/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
icon: fa6-solid:circle-question
---

# Troubleshooting

## The bundler / theme option is missing?
Expand Down
Loading

0 comments on commit fcf8475

Please sign in to comment.