From d71cf2d22b74ac58e2288492257f59f37bbeb995 Mon Sep 17 00:00:00 2001 From: meteorlxy Date: Fri, 29 Dec 2023 18:57:39 +0800 Subject: [PATCH] docs: improve plugin and theme guide --- docs/guide/plugin.md | 12 +++++++++--- docs/guide/theme.md | 2 ++ docs/zh/guide/plugin.md | 12 +++++++++--- docs/zh/guide/theme.md | 2 ++ 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/docs/guide/plugin.md b/docs/guide/plugin.md index c7af3767..147812d4 100644 --- a/docs/guide/plugin.md +++ b/docs/guide/plugin.md @@ -2,11 +2,11 @@ With the help of [Plugin API](../reference/plugin-api.md), VuePress plugin can provide different features for you. -## Community Plugin +## Official Plugin -Community users have created lots of plugins and published them to [NPM](https://www.npmjs.com/search?q=keywords:vuepress-plugin). VuePress team also maintains some official plugins under the [@vuepress](https://www.npmjs.com/search?q=%40vuepress%20keywords%3Aplugin) scope. You should check the plugin's own documentation for detailed guide. +VuePress team provides some official plugins. -In general, you need to import the plugin and use it in your config file via the [plugins](../reference/config.md#plugins) option. For example, use the [@vuepress/plugin-google-analytics](../reference/plugin/google-analytics.md) to integrate Google Analytics: +You need to import and use them in your config file via the [plugins](../reference/config.md#plugins) option. For example, use the [@vuepress/plugin-google-analytics](../reference/plugin/google-analytics.md) to integrate Google Analytics: ```ts import { googleAnalyticsPlugin } from '@vuepress/plugin-google-analytics' @@ -26,6 +26,12 @@ Most plugins can only be used once. If the same plugin is used multiple times, o However, some plugins can be used multiple times (e.g. [@vuepress/plugin-container](../reference/plugin/container.md)), and you should check the documentation of the plugin itself for detailed guide. ::: +## Community Plugin + +Community users have created lots of plugins and published them to [NPM](https://www.npmjs.com/search?q=keywords:vuepress-plugin). You should check the plugin's own documentation for detailed guide. + +You can explore more plugins in [Awesome VuePress](https://github.com/vuepress/awesome-vuepress) or [VuePress Marketplace](https://marketplace.vuejs.press/). + ## Local Plugin If you want to use your own plugin but don't want to publish it, you can create a local plugin. diff --git a/docs/guide/theme.md b/docs/guide/theme.md index 9e6e0941..c6bc5a17 100644 --- a/docs/guide/theme.md +++ b/docs/guide/theme.md @@ -33,6 +33,8 @@ However, you might think it is not good enough. Or, you want to build a differen Community users have created lots of theme and published them to [NPM](https://www.npmjs.com/search?q=keywords:vuepress-theme). You should check the theme's own documentation for detailed guide. +You can explore more themes in [Awesome VuePress](https://github.com/vuepress/awesome-vuepress) or [VuePress Marketplace](https://marketplace.vuejs.press/). + ## Local Theme If you want to use your own custom theme but don't want to publish it, you can create a local theme. Refer to [Advanced > Writing a Theme](../advanced/theme.md) for how to write your own theme. diff --git a/docs/zh/guide/plugin.md b/docs/zh/guide/plugin.md index 46f04328..b44709fc 100644 --- a/docs/zh/guide/plugin.md +++ b/docs/zh/guide/plugin.md @@ -2,11 +2,11 @@ 借助于 [插件 API](../reference/plugin-api.md) , VuePress 插件可以为你提供各种不同的功能。 -## 社区插件 +## 官方插件 -社区用户创建了很多插件,并将它们发布到了 [NPM](https://www.npmjs.com/search?q=keywords:vuepress-plugin) 上。 VuePress 团队也在 [@vuepress](https://www.npmjs.com/search?q=%40vuepress%20keywords%3Aplugin) Scope 下维护了一些官方插件。查看插件本身的文档可以获取更详细的指引。 +VuePress 团队提供了一些官方插件。 -一般而言,你需要导入插件并通过配置文件的 [plugins](../reference/config.md#plugins) 配置项来使用它。举例来说,你可以使用 [@vuepress/plugin-google-analytics](../reference/plugin/google-analytics.md) 来使用 Google Analytics : +你需要在你的配置文件中通过 [plugins](../reference/config.md#plugins) 配置项来使用它们。举例来说,你可以使用 [@vuepress/plugin-google-analytics](../reference/plugin/google-analytics.md) 来使用 Google Analytics : ```ts import { googleAnalyticsPlugin } from '@vuepress/plugin-google-analytics' @@ -26,6 +26,12 @@ export default { 然而,部分插件是可以被多次使用的(例如 [@vuepress/plugin-container](../reference/plugin/container.md)),你应该查看插件本身的文档来获取详细指引。 ::: +## 社区插件 + +社区用户创建了很多插件,并将它们发布到了 [NPM](https://www.npmjs.com/search?q=keywords:vuepress-plugin) 上。 查看插件本身的文档可以获取更详细的指引。 + +你可以在 [Awesome VuePress](https://github.com/vuepress/awesome-vuepress) 或者 [VuePress Marketplace](https://marketplace.vuejs.press/) 中探索更多插件。 + ## 本地插件 如果你想要使用自己的插件,但是又不想发布它,你可以创建一个本地插件。 diff --git a/docs/zh/guide/theme.md b/docs/zh/guide/theme.md index 1f43290c..b370993b 100644 --- a/docs/zh/guide/theme.md +++ b/docs/zh/guide/theme.md @@ -33,6 +33,8 @@ export default defineUserConfig({ 社区用户创建了很多主题,并将它们发布到了 [NPM](https://www.npmjs.com/search?q=keywords:vuepress-theme) 上。查看主题本身的文档可以获取更详细的指引。 +你可以在 [Awesome VuePress](https://github.com/vuepress/awesome-vuepress) 或者 [VuePress Marketplace](https://marketplace.vuejs.press/) 中探索更多主题。 + ## 本地主题 如果你想要使用自己的自定义主题,但是又不想发布它,你可以创建一个本地主题。前往 [深入 > 开发主题](../advanced/theme.md) 学习如何开发你自己的主题。