diff --git a/packages/docs/docs/.vuepress/config.js b/packages/docs/docs/.vuepress/config.js index a76f0e22e7..4f60566e18 100755 --- a/packages/docs/docs/.vuepress/config.js +++ b/packages/docs/docs/.vuepress/config.js @@ -43,6 +43,7 @@ module.exports = ctx => ({ lastUpdated: 'Last Updated', nav: require('./nav/en'), sidebar: { + '/api/': getApiSidebar(), '/guide/': getGuideSidebar('Guide', 'Advanced'), '/plugin/': getPluginSidebar('Plugin', 'Introduction', 'Official Plugins'), '/theme/': getThemeSidebar('Theme', 'Introduction'), @@ -55,6 +56,7 @@ module.exports = ctx => ({ lastUpdated: '上次更新', nav: require('./nav/zh'), sidebar: { + '/zh/api/': getApiSidebar(), '/zh/guide/': getGuideSidebar('指南', '深入'), '/zh/plugin/': getPluginSidebar('插件', '介绍', '官方插件'), '/zh/theme/': getThemeSidebar('主题', '介绍') @@ -87,6 +89,15 @@ module.exports = ctx => ({ ], }) +function getApiSidebar () { + return [ + '', + 'config', + 'cli', + 'node' + ] +} + function getGuideSidebar (groupA, groupB) { return [ { diff --git a/packages/docs/docs/.vuepress/nav/en.js b/packages/docs/docs/.vuepress/nav/en.js index 34a95546b6..671be2af3e 100644 --- a/packages/docs/docs/.vuepress/nav/en.js +++ b/packages/docs/docs/.vuepress/nav/en.js @@ -4,8 +4,8 @@ module.exports = [ link: '/guide/', }, { - text: 'Config Reference', - link: '/config/' + text: 'API', + link: '/api/' }, { text: 'Plugin', diff --git a/packages/docs/docs/.vuepress/nav/zh.js b/packages/docs/docs/.vuepress/nav/zh.js index 31f6ec36d2..b83b58cb0f 100644 --- a/packages/docs/docs/.vuepress/nav/zh.js +++ b/packages/docs/docs/.vuepress/nav/zh.js @@ -4,8 +4,8 @@ module.exports = [ link: '/zh/guide/', }, { - text: '配置', - link: '/zh/config/' + text: 'API', + link: '/zh/api/' }, { text: '插件', diff --git a/packages/docs/docs/api/README.md b/packages/docs/docs/api/README.md new file mode 100644 index 0000000000..5973fdfc03 --- /dev/null +++ b/packages/docs/docs/api/README.md @@ -0,0 +1,7 @@ +# API + +We offer a variety of ways to use VuePress. This section will cover the following two sections: + +- [Config Reference](./config.md) +- [Node.js API](./node.md) +- [Command Line Interface](./cli.md) diff --git a/packages/docs/docs/api/cli.md b/packages/docs/docs/api/cli.md new file mode 100644 index 0000000000..1a00eb86f0 --- /dev/null +++ b/packages/docs/docs/api/cli.md @@ -0,0 +1,45 @@ +# Command Line Interface + +## Usage + +```bash +vuepress targetDir [options] +``` + +## build + +Build dir as a static site. + +### -p, --port `` +See [port](./config.md#port). + +### -t, --temp `` +See [temp](./config.md#temp). + +### -c, --cache [cache] +### -no--cache [cache] +See [cache](./config.md#cache). + +### --debug +Start development server in debug mode. + +### --silent +Start development server in silent mode. + +## dev + +Start a development server. All options from `vuepress build` are available. And there are several options specifically for dev: + +### --host `` +See [host](../config.md#host). + +### --open +Open browser when ready. + +## eject + +Copy the default theme into `.vuepress/theme` for customization. + +## more commands + +You can create a custom command with [extendCli](../plugin/option-api.md#extendcli). diff --git a/packages/docs/docs/config/README.md b/packages/docs/docs/api/config.md similarity index 98% rename from packages/docs/docs/config/README.md rename to packages/docs/docs/api/config.md index 914531940b..f399a601b2 100644 --- a/packages/docs/docs/config/README.md +++ b/packages/docs/docs/api/config.md @@ -1,5 +1,5 @@ --- -sidebar: auto +sidebarDepth: 3 --- # Config Reference @@ -65,6 +65,13 @@ Specify the host to use for the dev server. Specify the port to use for the dev server. +### temp + +- Type: `number` +- Default: `@vuepress/core/.temp` + +Specify the temporary directory for client. + ### dest - Type: `string` diff --git a/packages/docs/docs/api/node.md b/packages/docs/docs/api/node.md new file mode 100644 index 0000000000..a2e7ef2943 --- /dev/null +++ b/packages/docs/docs/api/node.md @@ -0,0 +1,57 @@ +# Node.js API + +```js +const vuepress = require('vuepress') +``` + +## Global Methods + +### vuepress.dev + +Start a development server. + +### vuepress.build + +Build dir as a static site. + +### vuepress.eject + +Copy the default theme into `.vuepress/theme` for customization. + +### vuepress.createApp + +Create a VuePress App for for customization. For example, + +```js +const app = vuepress.createApp(/* options */) +app.process().then(() => { + console.log('ready!') + app.dev() +}) +``` + +## App Options + +### options.sourceDir + +Specify the source directory for VuePress. + +### options.theme + +See [theme](../config.md#theme). + +### options.plugins + +See [plugins](../config.md#plugins). + +### options.temp + +See [temp](../config.md#temp). + +### options.dest + +See [dest](../config.md#dest). + +### options.siteConfig + +See [siteConfig](../config.md). diff --git a/packages/docs/docs/guide/assets.md b/packages/docs/docs/guide/assets.md index 46171c846e..f77a9606a6 100644 --- a/packages/docs/docs/guide/assets.md +++ b/packages/docs/docs/guide/assets.md @@ -17,7 +17,7 @@ In addition, you can use the `~` prefix to explicitly indicate this is a webpack ![Image from dependency](~some-dependency/image.png) ``` -webpack aliases can be configured via [configureWebpack](/config/#configurewebpack) in `.vuepress/config.js`. Example: +webpack aliases can be configured via [configureWebpack](../api/config.md#configurewebpack) in `.vuepress/config.js`. Example: ``` js module.exports = { diff --git a/packages/docs/docs/guide/basic-config.md b/packages/docs/docs/guide/basic-config.md index 5a17dbcd01..5e5bbd9b8f 100644 --- a/packages/docs/docs/guide/basic-config.md +++ b/packages/docs/docs/guide/basic-config.md @@ -24,7 +24,7 @@ module.exports = { If you've got the dev server running, you should see the page now has a header with the title and a search box. VuePress comes with built-in headers-based search - it automatically builds a simple search index from the title, `h2` and `h3` headers from all the pages. -Consult the [Config Reference](../config/README.md) for a full list of options. +Consult the [Config Reference](../api/config.md) for a full list of options. ::: tip Alternative Config Formats You can also use YAML (`.vuepress/config.yml`) or TOML (`.vuepress/config.toml`) formats for the configuration file. diff --git a/packages/docs/docs/guide/directory-structure.md b/packages/docs/docs/guide/directory-structure.md index a22029f02f..a0f6c9cc96 100644 --- a/packages/docs/docs/guide/directory-structure.md +++ b/packages/docs/docs/guide/directory-structure.md @@ -60,7 +60,7 @@ For the above directory structure, the default page routing paths are as follows **Also see:** -- [Config](../config/README.md) -- [Theme](../theme/README.md) +- [Config](../api/config.md) +- [Theme](../theme/) - [Default Theme Config](../theme/default-theme-config.md) diff --git a/packages/docs/docs/guide/markdown.md b/packages/docs/docs/guide/markdown.md index 868046ae4a..d4aa824176 100644 --- a/packages/docs/docs/guide/markdown.md +++ b/packages/docs/docs/guide/markdown.md @@ -2,7 +2,7 @@ ## Header Anchors -Headers automatically get anchor links applied. Rendering of anchors can be configured using the [`markdown.anchor`](../config/README.md#markdown-anchor) option. +Headers automatically get anchor links applied. Rendering of anchors can be configured using the [`markdown.anchor`](../api/config.md#markdown-anchor) option. ## Links @@ -53,7 +53,7 @@ Outbound links automatically gets `target="_blank" rel="noopener noreferrer"`: - [vuejs.org](https://vuejs.org) - [VuePress on GitHub](https://github.com/vuejs/vuepress) -You can customize the attributes added to external links by setting [config.markdown.externalLinks](../config/README.md#markdown-externallinks). +You can customize the attributes added to external links by setting [config.markdown.externalLinks](../api/config.md#markdown-externallinks). ## Front Matter @@ -122,7 +122,7 @@ or [[toc]] -Rendering of TOC can be configured using the [`markdown.toc`](../config/README.md#markdown-toc) option, or as props of [TOC component](./using-vue.md#toc), like ``. +Rendering of TOC can be configured using the [`markdown.toc`](../api/config.md#markdown-toc) option, or as props of [TOC component](./using-vue.md#toc), like ``. ## Custom Containers diff --git a/packages/docs/docs/guide/using-vue.md b/packages/docs/docs/guide/using-vue.md index 52d46eb898..34c63246d1 100644 --- a/packages/docs/docs/guide/using-vue.md +++ b/packages/docs/docs/guide/using-vue.md @@ -168,7 +168,7 @@ yarn add -D pug pug-plain-loader ::: tip If you are a Stylus user, you don't need to install `stylus` and `stylus-loader` in your project because VuePress uses Stylus internally. -For pre-processors that do not have built-in webpack config support, you will need to [extend the internal webpack config](../config/README.md#configurewebpack) in addition to installing the necessary dependencies. +For pre-processors that do not have built-in webpack config support, you will need to [extend the internal webpack config](../api/config.md#configurewebpack) in addition to installing the necessary dependencies. ::: ## Script & Style Hoisting diff --git a/packages/docs/docs/miscellaneous/migration-guide.md b/packages/docs/docs/miscellaneous/migration-guide.md index 05f7af47e6..4f37a39b77 100644 --- a/packages/docs/docs/miscellaneous/migration-guide.md +++ b/packages/docs/docs/miscellaneous/migration-guide.md @@ -65,7 +65,7 @@ See: [@vuepress/plugin-pwa > Migration from 0.x](../plugin/official/plugin-pwa.m Replaced by `.vuepress/styles/palette.styl`. ::: upgrade -See: [Config > palette.styl](../config/README.md#palette-styl) +See: [Config > palette.styl](../api/config.md#palette-styl) ::: ### `.vuepress/style.styl` @@ -73,5 +73,5 @@ See: [Config > palette.styl](../config/README.md#palette-styl) Replaced by `.vuepress/styles/index.styl`. ::: upgrade -See: [Config > index.styl](../config/README.md#index-styl) +See: [Config > index.styl](../api/config.md#index-styl) ::: diff --git a/packages/docs/docs/plugin/context-api.md b/packages/docs/docs/plugin/context-api.md index a3c1dae32b..b6c895ca93 100644 --- a/packages/docs/docs/plugin/context-api.md +++ b/packages/docs/docs/plugin/context-api.md @@ -46,7 +46,7 @@ Output path. - Type: `string` -See: [base](../config/README.md#base). +See: [base](../api/config.md#base). ## ctx.writeTemp diff --git a/packages/docs/docs/plugin/official/plugin-nprogress.md b/packages/docs/docs/plugin/official/plugin-nprogress.md index 3ec33a6141..d083b87076 100644 --- a/packages/docs/docs/plugin/official/plugin-nprogress.md +++ b/packages/docs/docs/plugin/official/plugin-nprogress.md @@ -36,4 +36,4 @@ $nprogressColor = red **Also see:** -- [Config Reference > Styling](../../config/#styling) +- [Config Reference > Styling](../../api/config.md#styling) diff --git a/packages/docs/docs/theme/default-theme-config.md b/packages/docs/docs/theme/default-theme-config.md index 9ea32bc804..7651ac2a5b 100644 --- a/packages/docs/docs/theme/default-theme-config.md +++ b/packages/docs/docs/theme/default-theme-config.md @@ -379,7 +379,7 @@ Note that it's `off` by default. If given a `string`, it will be displayed as a The `themeConfig.serviceWorker` option allows you to configure the service worker. ::: tip -Please do not confuse this option with [Config > serviceWorker](../config/README.md#serviceworker), [Config > serviceWorker](../config/README.md#serviceworker) is **site-level**, while this option is **theme-level**. +Please do not confuse this option with [Config > serviceWorker](../api/config.md#serviceworker), [Config > serviceWorker](../api/config.md#serviceworker) is **site-level**, while this option is **theme-level**. ::: ### Popup UI to refresh contents diff --git a/packages/docs/docs/theme/writing-a-theme.md b/packages/docs/docs/theme/writing-a-theme.md index 90b580c9dc..331ce388bb 100644 --- a/packages/docs/docs/theme/writing-a-theme.md +++ b/packages/docs/docs/theme/writing-a-theme.md @@ -29,7 +29,7 @@ The compiled content of the current `.md` file being rendered will be available ## Directory Structure -Just one `Layout.vue` might not be enough, and you might also want to define more layout components in the theme for using on different pages. You may also want to customize the [palette](../config/README.md#palette-styl), and even apply some plugins. +Just one `Layout.vue` might not be enough, and you might also want to define more layout components in the theme for using on different pages. You may also want to customize the [palette](../api/config.md#palette-styl), and even apply some plugins. So it's time to reorganize your theme, an agreed theme directory structure is as follows: diff --git a/packages/docs/docs/zh/api/README.md b/packages/docs/docs/zh/api/README.md new file mode 100644 index 0000000000..eef509eeb7 --- /dev/null +++ b/packages/docs/docs/zh/api/README.md @@ -0,0 +1,7 @@ +# API + +我们提供了多种使用 VuePress 的方式。这一节将包括下面三个部分: + +- [配置说明](./config.md) +- [Node.js API](./node.md) +- [命令行接口](./cli.md) diff --git a/packages/docs/docs/zh/api/cli.md b/packages/docs/docs/zh/api/cli.md new file mode 100644 index 0000000000..639d45b946 --- /dev/null +++ b/packages/docs/docs/zh/api/cli.md @@ -0,0 +1,45 @@ +# 命令行接口 + +## 基本用法 + +```bash +vuepress targetDir [options] +``` + +## build + +在指定的目录生成一个静态站点。 + +### -p, --port `` +查看 [port](./config.md#port)。 + +### -t, --temp `` +查看 [temp](./config.md#temp)。 + +### -c, --cache [cache] +### -no--cache [cache] +查看 [cache](./config.md#cache)。 + +### --debug +以调试模式启动开发服务器。 + +### --silent +以安静模式启动开发服务器。 + +## dev + +启动一个开发服务器。来自 `vuepress build` 的所有选项都可用。除此以外,还有几个专门针对 dev 的选项: + +### --host `` +查看 [host](./config.md#host)。 + +### --open +当服务端准备就绪时自动打开浏览器。 + +## eject + +将默认主题复制到 `.vuepress/theme` 目录,以供自定义。 + +## more commands + +你可以使用 [extendCli](../plugin/option-api.md#extendcli) 来创建自定义命令。 diff --git a/packages/docs/docs/zh/config/README.md b/packages/docs/docs/zh/api/config.md similarity index 98% rename from packages/docs/docs/zh/config/README.md rename to packages/docs/docs/zh/api/config.md index 21e1bc17c7..d0f94a39a4 100644 --- a/packages/docs/docs/zh/config/README.md +++ b/packages/docs/docs/zh/api/config.md @@ -1,5 +1,5 @@ --- -sidebar: auto +sidebarDepth: 3 --- # 配置 @@ -63,6 +63,13 @@ module.exports = { 指定 dev server 的端口。 +### temp + +- Type: `number` +- Default: `@vuepress/core/.temp` + +指定客户端文件的临时目录。 + ### dest - 类型: `string` diff --git a/packages/docs/docs/zh/api/node.md b/packages/docs/docs/zh/api/node.md new file mode 100644 index 0000000000..15bae33f65 --- /dev/null +++ b/packages/docs/docs/zh/api/node.md @@ -0,0 +1,57 @@ +# Node.js + +```js +const vuepress = require('vuepress') +``` + +## 全局方法 + +### vuepress.dev + +启动一个开发服务器。 + +### vuepress.build + +生成一个静态站点。 + +### vuepress.eject + +将默认主题复制到 `.vuepress/theme` 目录,以供自定义。 + +### vuepress.createApp + +创建一个 VuePress 应用。 + +```js +const app = vuepress.createApp(/* options */) +app.process().then(() => { + console.log('ready!') + app.dev() +}) +``` + +## App 选项 + +### options.sourceDir + +指定 VuePress 的根目录。 + +### options.theme + +查看 [theme](./config.md#theme)。 + +### options.plugins + +查看 [plugins](./config.md#plugins)。 + +### options.temp + +查看 [temp](./config.md#temp)。 + +### options.dest + +查看 [dest](./config.md#dest)。 + +### options.siteConfig + +查看 [siteConfig](./config.md)。 diff --git a/packages/docs/docs/zh/guide/assets.md b/packages/docs/docs/zh/guide/assets.md index 346f79c3c2..e0370314d8 100644 --- a/packages/docs/docs/zh/guide/assets.md +++ b/packages/docs/docs/zh/guide/assets.md @@ -17,7 +17,7 @@ ![Image from dependency](~some-dependency/image.png) ``` -Webpack 的别名可以通过 `.vuepress/config.js` 中 [configureWebpack](../config/README.md#configurewebpack) 来配置,如: +Webpack 的别名可以通过 `.vuepress/config.js` 中 [configureWebpack](../api/config.md#configurewebpack) 来配置,如: ``` js module.exports = { diff --git a/packages/docs/docs/zh/guide/basic-config.md b/packages/docs/docs/zh/guide/basic-config.md index 5f4de76061..0144fb568f 100644 --- a/packages/docs/docs/zh/guide/basic-config.md +++ b/packages/docs/docs/zh/guide/basic-config.md @@ -24,7 +24,7 @@ module.exports = { 对于上述的配置,如果你运行起 dev server,你应该能看到一个页面,它包含一个页头,里面包含一个标题和一个搜索框。VuePress 内置了基于 headers 的搜索 —— 它会自动为所有页面的标题、`h2` 和 `h3` 构建起一个简单的搜索索引。 -参见 [配置](../config/) 来查看所有可配置的选项。 +参见 [配置](../api/config.md) 来查看所有可配置的选项。 ::: tip 其他配置格式 你也可以使用 YAML (`.vuepress/config.yml`) 或是 TOML (`.vuepress/config.toml`) 格式的配置文件。 diff --git a/packages/docs/docs/zh/guide/directory-structure.md b/packages/docs/docs/zh/guide/directory-structure.md index d42571122e..734878a747 100644 --- a/packages/docs/docs/zh/guide/directory-structure.md +++ b/packages/docs/docs/zh/guide/directory-structure.md @@ -50,7 +50,7 @@ VuePress 遵循 **“约定优于配置”** 的原则,推荐的目录结构 **同时阅读:** -- [配置](../config/README.md) +- [配置](../api/config.md) - [主题](../theme/README.md) - [默认主题配置](../theme/default-theme-config.md) diff --git a/packages/docs/docs/zh/guide/markdown.md b/packages/docs/docs/zh/guide/markdown.md index db05999fd6..caadb46fde 100644 --- a/packages/docs/docs/zh/guide/markdown.md +++ b/packages/docs/docs/zh/guide/markdown.md @@ -2,7 +2,7 @@ ## Header Anchors -所有的标题将会自动地应用 anchor 链接,anchor 的渲染可以通过 [`markdown.anchor`](../config/README.md#markdown-anchor) 来配置。 +所有的标题将会自动地应用 anchor 链接,anchor 的渲染可以通过 [`markdown.anchor`](../api/config.md#markdown-anchor) 来配置。 ## 链接 @@ -53,7 +53,7 @@ - [vuejs.org](https://vuejs.org) - [VuePress on GitHub](https://github.com/vuejs/vuepress) -你可以自定义通过配置 [config.markdown.externalLinks](../config/README.md#markdown-externallinks) 来自定义外部链接的特性。 +你可以自定义通过配置 [config.markdown.externalLinks](../api/config.md#markdown-externallinks) 来自定义外部链接的特性。 ## Front Matter @@ -120,7 +120,7 @@ lang: en-US [[toc]] -目录(Table of Contents)的渲染可以通过 [`markdown.toc`](../config/README.md#markdown-toc) 选项来配置,也可以在 [TOC 组件](./using-vue.md#toc)中直接传入,如 ``。 +目录(Table of Contents)的渲染可以通过 [`markdown.toc`](../api/config.md#markdown-toc) 选项来配置,也可以在 [TOC 组件](./using-vue.md#toc)中直接传入,如 ``。 ## 自定义容器 diff --git a/packages/docs/docs/zh/guide/using-vue.md b/packages/docs/docs/zh/guide/using-vue.md index 57b758c3f2..86863508e4 100644 --- a/packages/docs/docs/zh/guide/using-vue.md +++ b/packages/docs/docs/zh/guide/using-vue.md @@ -167,7 +167,7 @@ yarn add -D pug pug-plain-loader ::: tip 需要指出的是,如果你是一个 `stylus` 用户,你并不需要在你的项目中安装 `stylus` 和 `stylus-loader`,因为 VuePress 已经内置了它们。 -对于那些没有内置的预处理器,除了安装对应的依赖,你还需要 [拓展内部的 Webpack 配置](../config/README.md#configurewebpack)。 +对于那些没有内置的预处理器,除了安装对应的依赖,你还需要 [拓展内部的 Webpack 配置](../api/config.md#configurewebpack)。 ::: diff --git a/packages/docs/docs/zh/miscellaneous/migration-guide.md b/packages/docs/docs/zh/miscellaneous/migration-guide.md index 66031ee0f9..833610a5ee 100644 --- a/packages/docs/docs/zh/miscellaneous/migration-guide.md +++ b/packages/docs/docs/zh/miscellaneous/migration-guide.md @@ -65,7 +65,7 @@ Service Worker 相关的功能已经被分离为一个单独的插件 [@vuepress 使用 `.vuepress/styles/palette.styl` 代替。 ::: upgrade -参考: [Config > palette.styl](../config/README.md#palette-styl) +参考: [Config > palette.styl](../api/config.md#palette-styl) ::: ### `.vuepress/style.styl` @@ -73,5 +73,5 @@ Service Worker 相关的功能已经被分离为一个单独的插件 [@vuepress 使用 `.vuepress/styles/index.styl` 代替。 ::: upgrade -参考: [Config > index.styl](../config/README.md#index-styl) +参考: [Config > index.styl](../api/config.md#index-styl) ::: diff --git a/packages/docs/docs/zh/plugin/context-api.md b/packages/docs/docs/zh/plugin/context-api.md index af72f8d015..a3a9970761 100644 --- a/packages/docs/docs/zh/plugin/context-api.md +++ b/packages/docs/docs/zh/plugin/context-api.md @@ -46,7 +46,7 @@ VuePress 是否运行在生产环境模式下。 - 类型: `string` -参考: [base](../config/README.md#base). +参考: [base](../api/config.md#base). ## ctx.writeTemp diff --git a/packages/docs/docs/zh/plugin/official/plugin-nprogress.md b/packages/docs/docs/zh/plugin/official/plugin-nprogress.md index 81a0e8491b..ab71139efb 100644 --- a/packages/docs/docs/zh/plugin/official/plugin-nprogress.md +++ b/packages/docs/docs/zh/plugin/official/plugin-nprogress.md @@ -36,4 +36,4 @@ $nprogressColor = red **参考:** -- [配置 > Styling](../../config/#styling) +- [配置 > Styling](../../api/config.md#styling) diff --git a/packages/docs/docs/zh/theme/default-theme-config.md b/packages/docs/docs/zh/theme/default-theme-config.md index b31f25674f..06f38c21c1 100644 --- a/packages/docs/docs/zh/theme/default-theme-config.md +++ b/packages/docs/docs/zh/theme/default-theme-config.md @@ -374,7 +374,7 @@ module.exports = { `themeConfig.serviceWorker` 允许你去配置 Service Worker。 ::: tip 提示 -请不要将本选项与 [Config > serviceWorker](../config/README.md#serviceworker) 混淆,[Config > serviceWorker](../config/README.md#serviceworker) 是网站级别的配置,而本选项是主题级别的配置。 +请不要将本选项与 [Config > serviceWorker](../api/config.md#serviceworker) 混淆,[Config > serviceWorker](../api/config.md#serviceworker) 是网站级别的配置,而本选项是主题级别的配置。 ::: ### 刷新内容的弹窗 diff --git a/packages/docs/docs/zh/theme/writing-a-theme.md b/packages/docs/docs/zh/theme/writing-a-theme.md index a40b42d907..0901643d3a 100755 --- a/packages/docs/docs/zh/theme/writing-a-theme.md +++ b/packages/docs/docs/zh/theme/writing-a-theme.md @@ -33,7 +33,7 @@ ## 目录结构 -随着需求的变化,只有一个布局组件 `Layout.vue` 可能还不够,你可能想要定义更多的布局组件用于不同的页面,你可能还想要自定义一个[调色板](../config/README.md#palette-styl),甚至应用一些插件。 +随着需求的变化,只有一个布局组件 `Layout.vue` 可能还不够,你可能想要定义更多的布局组件用于不同的页面,你可能还想要自定义一个[调色板](../api/config.md#palette-styl),甚至应用一些插件。 那么是时候重新组织你的主题了!一个约定的主题的目录结构如下: