diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1df6188e78a2..cf13b05285ea 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -75,6 +75,15 @@ jobs: token: ${{ secrets.ACCESS_TOKEN }} single-commit: true + - name: Deploy copy-code2 docs + uses: JamesIves/github-pages-deploy-action@v4 + with: + repository-name: vuepress-theme-hope/copy-code2-docs + branch: netlify + folder: docs/copy-code2/dist + token: ${{ secrets.ACCESS_TOKEN }} + single-commit: true + - name: Deploy copyright2 docs uses: JamesIves/github-pages-deploy-action@v4 with: @@ -383,18 +392,14 @@ jobs: run: pnpm run build - name: Build ${{ matrix.plugin-name }} demo - env: - BASE: /${{ matrix.plugin-name }}-demo/ - HOSTNAME: https://vuepress-theme-hope.github.io/ run: |- pnpm --filter ${{ matrix.plugin-name }}-demo demo:vite-build - > demo/${{ matrix.plugin-name }}/src/.vuepress/dist/.nojekyll - name: Deploy ${{ matrix.plugin-name }} demo uses: JamesIves/github-pages-deploy-action@v4 with: repository-name: vuepress-theme-hope/${{ matrix.plugin-name }}-demo - branch: gh-pages + branch: netlify folder: demo/${{ matrix.plugin-name }}/src/.vuepress/dist token: ${{ secrets.ACCESS_TOKEN }} single-commit: true diff --git a/demo/copyright2/src/.vuepress/config.ts b/demo/copyright2/src/.vuepress/config.ts index ad1ce4619fd4..4833c3371907 100644 --- a/demo/copyright2/src/.vuepress/config.ts +++ b/demo/copyright2/src/.vuepress/config.ts @@ -22,7 +22,7 @@ export default defineUserConfig({ copyrightPlugin({ author: "Mr.Hope", license: "MIT", - canonical: "https://vuepress-theme-hope.github.io", + canonical: "https://plugin-copyright2.vuejs.press", global: true, }), ], diff --git a/demo/feed2/src/.vuepress/config.ts b/demo/feed2/src/.vuepress/config.ts index b20fa21773eb..f2077b87dffb 100644 --- a/demo/feed2/src/.vuepress/config.ts +++ b/demo/feed2/src/.vuepress/config.ts @@ -40,7 +40,7 @@ export default defineUserConfig({ plugins: [ feedPlugin({ - hostname: "https://vuepress-theme-hope.github.io", + hostname: "https://plugin-feed2-demo.vuejs.press", atom: true, rss: true, json: true, diff --git a/demo/seo2/src/.vuepress/config.ts b/demo/seo2/src/.vuepress/config.ts index 7fbb30123288..0d9cfb71a304 100644 --- a/demo/seo2/src/.vuepress/config.ts +++ b/demo/seo2/src/.vuepress/config.ts @@ -21,7 +21,7 @@ export default defineUserConfig({ plugins: [ seoPlugin({ - hostname: "https://vuepress-theme-hope.github.io", + hostname: "https://plugin-seo2-demo.vuejs.press", }), ], }); diff --git a/demo/sitemap2/src/.vuepress/config.ts b/demo/sitemap2/src/.vuepress/config.ts index cef7af632121..6afa0502ceb4 100644 --- a/demo/sitemap2/src/.vuepress/config.ts +++ b/demo/sitemap2/src/.vuepress/config.ts @@ -19,7 +19,7 @@ export default defineUserConfig({ plugins: [ sitemapPlugin({ - hostname: "https://vuepress-theme-hope.github.io", + hostname: "https://plugin-sitemap2-demo.vuejs.press", }), ], }); diff --git a/demo/theme-blog/src/.vuepress/navbar/en.ts b/demo/theme-blog/src/.vuepress/navbar/en.ts index cca398b53757..c4e6bb17b8f8 100644 --- a/demo/theme-blog/src/.vuepress/navbar/en.ts +++ b/demo/theme-blog/src/.vuepress/navbar/en.ts @@ -55,7 +55,7 @@ export const enNavbar = navbar([ }, { text: "V2 Docs Demo", - link: "https://vuepress-theme-hope.github.io/docs-demo/", + link: "https://theme-hope-docs-demo.vuejs.press/", }, { text: "V1 Docs", diff --git a/demo/theme-blog/src/.vuepress/navbar/zh.ts b/demo/theme-blog/src/.vuepress/navbar/zh.ts index 064ee567a4cf..9e8762ed85ed 100644 --- a/demo/theme-blog/src/.vuepress/navbar/zh.ts +++ b/demo/theme-blog/src/.vuepress/navbar/zh.ts @@ -54,8 +54,8 @@ export const zhNavbar = navbar([ link: "https://theme-hope.vuejs.press/zh/", }, { - text: "V2 文档案例o", - link: "https://vuepress-theme-hope.github.io/docs-demo/zh/", + text: "V2 文档案例", + link: "https://theme-hope-docs-demo.vuejs.press/zh/", }, { text: "V1 文档", diff --git a/demo/theme-blog/src/.vuepress/theme.ts b/demo/theme-blog/src/.vuepress/theme.ts index 67ddac3a54ef..609a97c421bf 100644 --- a/demo/theme-blog/src/.vuepress/theme.ts +++ b/demo/theme-blog/src/.vuepress/theme.ts @@ -4,7 +4,7 @@ import { enNavbar, zhNavbar } from "./navbar/index.js"; import { enSidebar, zhSidebar } from "./sidebar/index.js"; const hostname = - process.env.HOSTNAME || "https://vuepress-theme-hope-blog-demo.netlify.app"; + process.env.HOSTNAME || "https://theme-hope-blog-demo.vuejs.press"; export default hopeTheme({ hostname, @@ -275,8 +275,8 @@ export default hopeTheme({ }, seo: - hostname === "https://vuepress-theme-hope.github.io" + hostname === "https://theme-hope-blog-demo.vuejs.press" ? {} - : { canonical: "https://vuepress-theme-hope.github.io/blog-demo/" }, + : { canonical: "https://theme-hope-blog-demo.vuejs.press" }, }, }); diff --git a/demo/theme-docs/src/.vuepress/navbar/en.ts b/demo/theme-docs/src/.vuepress/navbar/en.ts index f713b2f397ea..acfe8e5d9ccd 100644 --- a/demo/theme-docs/src/.vuepress/navbar/en.ts +++ b/demo/theme-docs/src/.vuepress/navbar/en.ts @@ -33,7 +33,7 @@ export const enNavbar = navbar([ }, { text: "V2 Blog Demo", - link: "https://vuepress-theme-hope.github.io/blog-demo/", + link: "https://theme-hope-blog-demo.vuejs.press/", }, { text: "V1 Docs", diff --git a/demo/theme-docs/src/.vuepress/navbar/zh.ts b/demo/theme-docs/src/.vuepress/navbar/zh.ts index 4f9330c39174..a89dac8a1b85 100644 --- a/demo/theme-docs/src/.vuepress/navbar/zh.ts +++ b/demo/theme-docs/src/.vuepress/navbar/zh.ts @@ -33,7 +33,7 @@ export const zhNavbar = navbar([ }, { text: "V2 博客演示", - link: "https://vuepress-theme-hope.github.io/blog-demo/zh/", + link: "https://theme-hope-blog-demo.vuejs.press/zh/", }, { text: "V1 文档", diff --git a/demo/theme-docs/src/.vuepress/theme.ts b/demo/theme-docs/src/.vuepress/theme.ts index 536c5ce97e3f..f5b1ac3c84d3 100644 --- a/demo/theme-docs/src/.vuepress/theme.ts +++ b/demo/theme-docs/src/.vuepress/theme.ts @@ -3,7 +3,7 @@ import { enNavbar, zhNavbar } from "./navbar/index.js"; import { enSidebar, zhSidebar } from "./sidebar/index.js"; const hostname = - process.env.HOSTNAME || "https://vuepress-theme-hope-docs-demo.netlify.app"; + process.env.HOSTNAME || "https://theme-hope-docs-demo.vuejs.press"; export default hopeTheme({ hostname, @@ -202,8 +202,8 @@ export default hopeTheme({ }, seo: - hostname === "https://vuepress-theme-hope.github.io" + hostname === "https://theme-hope-docs-demo.vuejs.press" ? {} - : { canonical: "https://vuepress-theme-hope.github.io/docs-demo/" }, + : { canonical: "https://theme-hope-docs-demo.vuejs.press" }, }, }); diff --git a/docs-shared/src/components/NetlifyBadge.ts b/docs-shared/src/components/NetlifyBadge.ts index 945e2e6b1ddd..17a7ee978afc 100644 --- a/docs-shared/src/components/NetlifyBadge.ts +++ b/docs-shared/src/components/NetlifyBadge.ts @@ -1,6 +1,8 @@ +import { ClientOnly } from "@vuepress/client"; import { defineComponent, h } from "vue"; // @ts-ignore import { useDarkMode } from "@theme-hope/modules/outlook/composables/index"; + import type { VNode } from "vue"; declare const IS_NETLIFY: boolean; @@ -13,15 +15,17 @@ export default defineComponent({ return (): VNode | null => IS_NETLIFY - ? h( - "a", - { href: "https://www.netlify.com", target: "_blank" }, - h("img", { - src: `https://www.netlify.com/img/global/badges/netlify-${ - isDarkMode.value ? "dark" : "light" - }.svg`, - alt: "Deploys by Netlify", - }) + ? h(ClientOnly, () => + h( + "a", + { href: "https://www.netlify.com", target: "_blank" }, + h("img", { + src: `https://www.netlify.com/img/global/badges/netlify-${ + isDarkMode.value ? "dark" : "light" + }.svg`, + alt: "Deploys by Netlify", + }) + ) ) : null; }, diff --git a/docs-shared/src/theme-wrapper.ts b/docs-shared/src/theme-wrapper.ts index 0e7cceef4acd..431a62a0b63d 100644 --- a/docs-shared/src/theme-wrapper.ts +++ b/docs-shared/src/theme-wrapper.ts @@ -10,7 +10,13 @@ export const theme = ( name: string, { plugins = {}, ...options }: ThemeOptions ): ThemeFunction => { - const canonical = `https://plugin-${name}.vuejs.press`; + const canonical = `https://${ + name === "theme" + ? "theme-hope" + : name === "shared" + ? "shared" + : `plugin-${name}` + }.vuejs.press`; const hostname = IS_GITHUB ? "https://vuepress-theme-hope.github.io" diff --git a/docs/auto-catalog/src/demo.md b/docs/auto-catalog/src/demo.md index d9b4ef7e38e6..0c42c579e34e 100644 --- a/docs/auto-catalog/src/demo.md +++ b/docs/auto-catalog/src/demo.md @@ -6,4 +6,4 @@ icon: discover We provide a demo using `vuepress-plugin-auto-catalog` and `@vuepress/theme-default` for you to better understand how to use the plugin. - [Source Code](https://github.com/vuepress-theme-hope/vuepress-theme-hope/tree/main/demo/auto-catalog/). -- [Preview](https://vuepress-theme-hope.github.io/auto-catalog-demo/) +- [Preview](https://plugin-auto-catalog-demo.vuejs.press) diff --git a/docs/auto-catalog/src/zh/demo.md b/docs/auto-catalog/src/zh/demo.md index cb3871ff48e0..d4660774559d 100644 --- a/docs/auto-catalog/src/zh/demo.md +++ b/docs/auto-catalog/src/zh/demo.md @@ -6,4 +6,4 @@ icon: discover 为了让你更好的了解如何使用插件,我们使用 `vuepress-plugin-auto-catalog` 和 `@vuepress/theme-default` 制作了一个案例。 - [源代码](https://github.com/vuepress-theme-hope/vuepress-theme-hope/tree/main/demo/auto-catalog/) -- [预览](https://vuepress-theme-hope.github.io/auto-catalog-demo/) +- [预览](https://plugin-auto-catalog-demo.vuejs.press) diff --git a/docs/blog2/src/demo.md b/docs/blog2/src/demo.md index de90385d5c4b..cbac5209b213 100644 --- a/docs/blog2/src/demo.md +++ b/docs/blog2/src/demo.md @@ -6,4 +6,4 @@ icon: discover We provide a demo using `vuepress-plugin-blog2` and `@vuepress/theme-default` for you to better understand how to use the plugin. - [Source Code](https://github.com/vuepress-theme-hope/vuepress-theme-hope/tree/main/demo/blog2/). -- [Preview](https://vuepress-theme-hope.github.io/blog2-demo/) +- [Preview](https://plugin-blog2-demo.vuejs.press) diff --git a/docs/blog2/src/zh/demo.md b/docs/blog2/src/zh/demo.md index 924218ecb72b..76bdeed9d490 100644 --- a/docs/blog2/src/zh/demo.md +++ b/docs/blog2/src/zh/demo.md @@ -6,4 +6,4 @@ icon: discover 为了让你更好的了解如何使用插件,我们使用 `vuepress-plugin-blog2` 和 `@vuepress/theme-default` 制作了一个案例。 - [源代码](https://github.com/vuepress-theme-hope/vuepress-theme-hope/tree/main/demo/blog2/) -- [预览](https://vuepress-theme-hope.github.io/blog2-demo/) +- [预览](https://plugin-blog2-demo.vuejs.press) diff --git a/docs/comment2/src/demo.md b/docs/comment2/src/demo.md index b1e3f3cfeb38..6f8793b40c56 100644 --- a/docs/comment2/src/demo.md +++ b/docs/comment2/src/demo.md @@ -6,4 +6,4 @@ icon: discover We provide a demo using `vuepress-plugin-comment2` and `@vuepress/theme-default` for you to better understand how to use the plugin. - [Source Code](https://github.com/vuepress-theme-hope/vuepress-theme-hope/tree/main/demo/comment2/). -- [Preview](https://vuepress-theme-hope.github.io/comment2-demo/) +- [Preview](https://plugin-comment2-demo.vuejs.press) diff --git a/docs/comment2/src/zh/demo.md b/docs/comment2/src/zh/demo.md index dbfa526e92f8..5a38ba2ae164 100644 --- a/docs/comment2/src/zh/demo.md +++ b/docs/comment2/src/zh/demo.md @@ -6,4 +6,4 @@ icon: discover 为了让你更好的了解如何使用插件,我们使用 `vuepress-plugin-comment2` 和 `@vuepress/theme-default` 制作了一个案例。 - [源代码](https://github.com/vuepress-theme-hope/vuepress-theme-hope/tree/main/demo/comment2/) -- [预览](https://vuepress-theme-hope.github.io/comment2-demo/) +- [预览](https://plugin-comment2-demo.vuejs.press) diff --git a/docs/components/src/demo.md b/docs/components/src/demo.md index b5f0a0c0f351..361c1b782528 100644 --- a/docs/components/src/demo.md +++ b/docs/components/src/demo.md @@ -6,4 +6,4 @@ icon: discover We provide a demo using `vuepress-plugin-components` and `@vuepress/theme-default` for you to better understand how to use the plugin. - [Source Code](https://github.com/vuepress-theme-hope/vuepress-theme-hope/tree/main/demo/components/). -- [Preview](https://vuepress-theme-hope.github.io/components-demo/) +- [Preview](https://plugin-components-demo.vuejs.press) diff --git a/docs/components/src/zh/demo.md b/docs/components/src/zh/demo.md index 4ea0688a4107..deca4bc3f0a9 100644 --- a/docs/components/src/zh/demo.md +++ b/docs/components/src/zh/demo.md @@ -6,4 +6,4 @@ icon: discover 为了让你更好的了解如何使用插件,我们使用 `vuepress-plugin-components` 和 `@vuepress/theme-default` 制作了一个案例。 - [源代码](https://github.com/vuepress-theme-hope/vuepress-theme-hope/tree/main/demo/components/) -- [预览](https://vuepress-theme-hope.github.io/components-demo/) +- [预览](https://plugin-components-demo.vuejs.press) diff --git a/docs/copy-code2/src/demo.md b/docs/copy-code2/src/demo.md index b074661b43f5..f3a6f0f7f130 100644 --- a/docs/copy-code2/src/demo.md +++ b/docs/copy-code2/src/demo.md @@ -6,4 +6,4 @@ icon: discover We provide a demo using `vuepress-plugin-copy-code2` and `@vuepress/theme-default` for you to better understand how to use the plugin. - [Source Code](https://github.com/vuepress-theme-hope/vuepress-theme-hope/tree/main/demo/copy-code2/). -- [Preview](https://vuepress-theme-hope.github.io/copy-code2-demo/) +- [Preview](https://plugin-copy-code2-demo.vuejs.press) diff --git a/docs/copy-code2/src/zh/demo.md b/docs/copy-code2/src/zh/demo.md index 9046862dac4f..0902e9e96864 100644 --- a/docs/copy-code2/src/zh/demo.md +++ b/docs/copy-code2/src/zh/demo.md @@ -6,4 +6,4 @@ icon: discover 为了让你更好的了解如何使用插件,我们使用 `vuepress-plugin-copy-code2` 和 `@vuepress/theme-default` 制作了一个案例。 - [源代码](https://github.com/vuepress-theme-hope/vuepress-theme-hope/tree/main/demo/copy-code2/) -- [预览](https://vuepress-theme-hope.github.io/copy-code2-demo/) +- [预览](https://plugin-copy-code2-demo.vuejs.press) diff --git a/docs/copyright2/src/demo.md b/docs/copyright2/src/demo.md index e64338cf64de..b3a2c2c34ab7 100644 --- a/docs/copyright2/src/demo.md +++ b/docs/copyright2/src/demo.md @@ -6,4 +6,4 @@ icon: discover We provide a demo using `vuepress-plugin-copyright2` and `@vuepress/theme-default` for you to better understand how to use the plugin. - [Source Code](https://github.com/vuepress-theme-hope/vuepress-theme-hope/tree/main/demo/copyright2/). -- [Preview](https://vuepress-theme-hope.github.io/copyright2-demo/) +- [Preview](https://plugin-copyright2-demo.vuejs.press) diff --git a/docs/copyright2/src/zh/demo.md b/docs/copyright2/src/zh/demo.md index ab141f73ca82..a96835cfade2 100644 --- a/docs/copyright2/src/zh/demo.md +++ b/docs/copyright2/src/zh/demo.md @@ -6,4 +6,4 @@ icon: discover 为了让你更好的了解如何使用插件,我们使用 `vuepress-plugin-copyright2` 和 `@vuepress/theme-default` 制作了一个案例。 - [源代码](https://github.com/vuepress-theme-hope/vuepress-theme-hope/tree/main/demo/copyright2/) -- [预览](https://vuepress-theme-hope.github.io/copyright2-demo/) +- [预览](https://plugin-copyright2-demo.vuejs.press) diff --git a/docs/feed2/src/demo.md b/docs/feed2/src/demo.md index 92ad847bb33b..6bf87762ec57 100644 --- a/docs/feed2/src/demo.md +++ b/docs/feed2/src/demo.md @@ -6,4 +6,4 @@ icon: discover We provide a demo using `vuepress-plugin-feed2` and `@vuepress/theme-default` for you to better understand how to use the plugin. - [Source Code](https://github.com/vuepress-theme-hope/vuepress-theme-hope/tree/main/demo/feed2/). -- [Preview](https://vuepress-theme-hope.github.io/feed2-demo/) +- [Preview](https://plugin-feed2-demo.vuejs.press) diff --git a/docs/feed2/src/zh/demo.md b/docs/feed2/src/zh/demo.md index d4efeca4ef5a..a0a7367e0042 100644 --- a/docs/feed2/src/zh/demo.md +++ b/docs/feed2/src/zh/demo.md @@ -6,4 +6,4 @@ icon: discover 为了让你更好的了解如何使用插件,我们使用 `vuepress-plugin-feed2` 和 `@vuepress/theme-default` 制作了一个案例。 - [源代码](https://github.com/vuepress-theme-hope/vuepress-theme-hope/tree/main/demo/feed2/) -- [预览](https://vuepress-theme-hope.github.io/feed2-demo/) +- [预览](https://plugin-feed2-demo.vuejs.press) diff --git a/docs/lightgallery/src/demo.md b/docs/lightgallery/src/demo.md index 2ab0865a0a5d..3939fc851107 100644 --- a/docs/lightgallery/src/demo.md +++ b/docs/lightgallery/src/demo.md @@ -6,4 +6,4 @@ icon: discover We provide a demo using `vuepress-plugin-lightgallery` and `@vuepress/theme-default` for you to better understand how to use the plugin. - [Source Code](https://github.com/vuepress-theme-hope/vuepress-theme-hope/tree/main/demo/lightgallery/). -- [Preview](https://vuepress-theme-hope.github.io/lightgallery-demo/) +- [Preview](https://plugin-lightgallery-demo.vuejs.press) diff --git a/docs/lightgallery/src/zh/demo.md b/docs/lightgallery/src/zh/demo.md index cdd40d32bbf4..7bae7d108211 100644 --- a/docs/lightgallery/src/zh/demo.md +++ b/docs/lightgallery/src/zh/demo.md @@ -6,4 +6,4 @@ icon: discover 为了让你更好的了解如何使用插件,我们使用 `vuepress-plugin-lightgallery` 和 `@vuepress/theme-default` 制作了一个案例。 - [源代码](https://github.com/vuepress-theme-hope/vuepress-theme-hope/tree/main/demo/lightgallery/) -- [预览](https://vuepress-theme-hope.github.io/lightgallery-demo/) +- [预览](https://plugin-lightgallery-demo.vuejs.press) diff --git a/docs/md-enhance/src/demo.md b/docs/md-enhance/src/demo.md index 23b8ac67557a..48ef5f930fcb 100644 --- a/docs/md-enhance/src/demo.md +++ b/docs/md-enhance/src/demo.md @@ -6,4 +6,4 @@ icon: discover We provide a demo using `vuepress-plugin-md-enhance` and `@vuepress/theme-default` for you to better understand how to use the plugin. - [Source Code](https://github.com/vuepress-theme-hope/vuepress-theme-hope/tree/main/demo/md-enhance/). -- [Preview](https://vuepress-theme-hope.github.io/md-enhance-demo/) +- [Preview](https://plugin-md-enhance-demo.vuejs.press) diff --git a/docs/md-enhance/src/zh/demo.md b/docs/md-enhance/src/zh/demo.md index 4041f83a0e60..ab8c1000cc5c 100644 --- a/docs/md-enhance/src/zh/demo.md +++ b/docs/md-enhance/src/zh/demo.md @@ -6,4 +6,4 @@ icon: discover 为了让你更好的了解如何使用插件,我们使用 `vuepress-plugin-md-enhance` 和 `@vuepress/theme-default` 制作了一个案例。 - [源代码](https://github.com/vuepress-theme-hope/vuepress-theme-hope/tree/main/demo/md-enhance/) -- [预览](https://vuepress-theme-hope.github.io/md-enhance-demo/) +- [预览](https://plugin-md-enhance-demo.vuejs.press) diff --git a/docs/photo-swipe/src/demo.md b/docs/photo-swipe/src/demo.md index 20c7a64c664f..794561d3c40d 100644 --- a/docs/photo-swipe/src/demo.md +++ b/docs/photo-swipe/src/demo.md @@ -6,4 +6,4 @@ icon: discover We provide a demo using `vuepress-plugin-photo-swipe` and `@vuepress/theme-default` for you to better understand how to use the plugin. - [Source Code](https://github.com/vuepress-theme-hope/vuepress-theme-hope/tree/main/demo/photo-swipe/). -- [Preview](https://vuepress-theme-hope.github.io/photo-swipe-demo/) +- [Preview](https://plugin-photo-swipe-demo.vuejs.press) diff --git a/docs/photo-swipe/src/zh/demo.md b/docs/photo-swipe/src/zh/demo.md index 2efddb99a008..e71460b55f36 100644 --- a/docs/photo-swipe/src/zh/demo.md +++ b/docs/photo-swipe/src/zh/demo.md @@ -6,4 +6,4 @@ icon: discover 为了让你更好的了解如何使用插件,我们使用 `vuepress-plugin-photo-swipe` 和 `@vuepress/theme-default` 制作了一个案例。 - [源代码](https://github.com/vuepress-theme-hope/vuepress-theme-hope/tree/main/demo/photo-swipe/) -- [预览](https://vuepress-theme-hope.github.io/photo-swipe-demo/) +- [预览](https://plugin-photo-swipe-demo.vuejs.press) diff --git a/docs/pwa2/src/demo.md b/docs/pwa2/src/demo.md index 115f8ce6f51c..ea59540fffdd 100644 --- a/docs/pwa2/src/demo.md +++ b/docs/pwa2/src/demo.md @@ -6,4 +6,4 @@ icon: discover We provide a demo using `vuepress-plugin-pwa2` and `@vuepress/theme-default` for you to better understand how to use the plugin. - [Source Code](https://github.com/vuepress-theme-hope/vuepress-theme-hope/tree/main/demo/pwa2/). -- [Preview](https://vuepress-theme-hope.github.io/pwa2-demo/) +- [Preview](https://plugin-pwa2-demo.vuejs.press) diff --git a/docs/pwa2/src/zh/demo.md b/docs/pwa2/src/zh/demo.md index 9b4d91ad0b3c..3256dfcd745d 100644 --- a/docs/pwa2/src/zh/demo.md +++ b/docs/pwa2/src/zh/demo.md @@ -6,4 +6,4 @@ icon: discover 为了让你更好的了解如何使用插件,我们使用 `vuepress-plugin-pwa2` 和 `@vuepress/theme-default` 制作了一个案例。 - [源代码](https://github.com/vuepress-theme-hope/vuepress-theme-hope/tree/main/demo/pwa2/) -- [预览](https://vuepress-theme-hope.github.io/pwa2-demo/) +- [预览](https://plugin-pwa2-demo.vuejs.press) diff --git a/docs/redirect/src/demo.md b/docs/redirect/src/demo.md index 8afc0d37d18b..63093188f14d 100644 --- a/docs/redirect/src/demo.md +++ b/docs/redirect/src/demo.md @@ -6,4 +6,4 @@ icon: discover We provide a demo using `vuepress-plugin-redirect` and `@vuepress/theme-default` for you to better understand how to use the plugin. - [Source Code](https://github.com/vuepress-theme-hope/vuepress-theme-hope/tree/main/demo/redirect/). -- [Preview](https://vuepress-theme-hope.github.io/redirect-demo/) +- [Preview](https://plugin-redirect-demo.vuejs.press) diff --git a/docs/redirect/src/zh/demo.md b/docs/redirect/src/zh/demo.md index b55f29d7fb5d..ed5974d89093 100644 --- a/docs/redirect/src/zh/demo.md +++ b/docs/redirect/src/zh/demo.md @@ -6,4 +6,4 @@ icon: discover 为了让你更好的了解如何使用插件,我们使用 `vuepress-plugin-redirect` 和 `@vuepress/theme-default` 制作了一个案例。 - [源代码](https://github.com/vuepress-theme-hope/vuepress-theme-hope/tree/main/demo/redirect/) -- [预览](https://vuepress-theme-hope.github.io/redirect-demo/) +- [预览](https://plugin-redirect-demo.vuejs.press) diff --git a/docs/sass-palette/src/demo.md b/docs/sass-palette/src/demo.md index eb073e222bc0..6be27d8cbe21 100644 --- a/docs/sass-palette/src/demo.md +++ b/docs/sass-palette/src/demo.md @@ -6,4 +6,4 @@ icon: discover We provide a demo using `vuepress-plugin-sass-palette` and `@vuepress/theme-default` for you to better understand how to use the plugin. - [Source Code](https://github.com/vuepress-theme-hope/vuepress-theme-hope/tree/main/demo/sass-palette/). -- [Preview](https://vuepress-theme-hope.github.io/sass-palette-demo/) +- [Preview](https://plugin-sass-palette-demo.vuejs.press) diff --git a/docs/sass-palette/src/zh/demo.md b/docs/sass-palette/src/zh/demo.md index 2648fa022f4f..464cee4dba02 100644 --- a/docs/sass-palette/src/zh/demo.md +++ b/docs/sass-palette/src/zh/demo.md @@ -6,4 +6,4 @@ icon: discover 为了让你更好的了解如何使用插件,我们使用 `vuepress-plugin-sass-palette` 和 `@vuepress/theme-default` 制作了一个案例。 - [源代码](https://github.com/vuepress-theme-hope/vuepress-theme-hope/tree/main/demo/sass-palette/) -- [预览](https://vuepress-theme-hope.github.io/sass-palette-demo/) +- [预览](https://plugin-sass-palette-demo.vuejs.press) diff --git a/docs/search-pro/src/demo.md b/docs/search-pro/src/demo.md index fb0dd2fb7d0a..bef29863f771 100644 --- a/docs/search-pro/src/demo.md +++ b/docs/search-pro/src/demo.md @@ -6,4 +6,4 @@ icon: discover We provide a demo using `vuepress-plugin-search-pro` and `@vuepress/theme-default` for you to better understand how to use the plugin. - [Source Code](https://github.com/vuepress-theme-hope/vuepress-theme-hope/tree/main/demo/search-pro/). -- [Preview](https://vuepress-theme-hope.github.io/search-pro-demo/) +- [Preview](https://plugin-search-pro-demo.vuejs.press) diff --git a/docs/search-pro/src/zh/demo.md b/docs/search-pro/src/zh/demo.md index a5429e4426db..66f14b76dd10 100644 --- a/docs/search-pro/src/zh/demo.md +++ b/docs/search-pro/src/zh/demo.md @@ -6,4 +6,4 @@ icon: discover 为了让你更好的了解如何使用插件,我们使用 `vuepress-plugin-search-pro` 和 `@vuepress/theme-default` 制作了一个案例。 - [源代码](https://github.com/vuepress-theme-hope/vuepress-theme-hope/tree/main/demo/search-pro/) -- [预览](https://vuepress-theme-hope.github.io/search-pro-demo/) +- [预览](https://plugin-search-pro-demo.vuejs.press) diff --git a/docs/seo2/src/demo.md b/docs/seo2/src/demo.md index 02ee9d71f32d..665d9ee49e9d 100644 --- a/docs/seo2/src/demo.md +++ b/docs/seo2/src/demo.md @@ -6,4 +6,4 @@ icon: discover We provide a demo using `vuepress-plugin-seo2` and `@vuepress/theme-default` for you to better understand how to use the plugin. - [Source Code](https://github.com/vuepress-theme-hope/vuepress-theme-hope/tree/main/demo/seo2/). -- [Preview](https://vuepress-theme-hope.github.io/seo2-demo/) +- [Preview](https://plugin-seo2-demo.vuejs.press) diff --git a/docs/seo2/src/zh/demo.md b/docs/seo2/src/zh/demo.md index 1a7f5283a842..0a97d0885bcf 100644 --- a/docs/seo2/src/zh/demo.md +++ b/docs/seo2/src/zh/demo.md @@ -6,4 +6,4 @@ icon: discover 为了让你更好的了解如何使用插件,我们使用 `vuepress-plugin-seo2` 和 `@vuepress/theme-default` 制作了一个案例。 - [源代码](https://github.com/vuepress-theme-hope/vuepress-theme-hope/tree/main/demo/seo2/) -- [预览](https://vuepress-theme-hope.github.io/seo2-demo/) +- [预览](https://plugin-seo2-demo.vuejs.press) diff --git a/docs/sitemap2/src/demo.md b/docs/sitemap2/src/demo.md index ec4cf39956dc..b76485cfb39a 100644 --- a/docs/sitemap2/src/demo.md +++ b/docs/sitemap2/src/demo.md @@ -6,4 +6,4 @@ icon: discover We provide a demo using `vuepress-plugin-sitemap2` and `@vuepress/theme-default` for you to better understand how to use the plugin. - [Source Code](https://github.com/vuepress-theme-hope/vuepress-theme-hope/tree/main/demo/sitemap2/). -- [Preview](https://vuepress-theme-hope.github.io/sitemap2-demo/) +- [Preview](https://plugin-sitemap2-demo.vuejs.press) diff --git a/docs/sitemap2/src/zh/demo.md b/docs/sitemap2/src/zh/demo.md index 45c287abf1af..8991c8ab6728 100644 --- a/docs/sitemap2/src/zh/demo.md +++ b/docs/sitemap2/src/zh/demo.md @@ -6,4 +6,4 @@ icon: discover 为了让你更好的了解如何使用插件,我们使用 `vuepress-plugin-sitemap2` 和 `@vuepress/theme-default` 制作了一个案例。 - [源代码](https://github.com/vuepress-theme-hope/vuepress-theme-hope/tree/main/demo/sitemap2/) -- [预览](https://vuepress-theme-hope.github.io/sitemap2-demo/) +- [预览](https://plugin-sitemap2-demo.vuejs.press) diff --git a/docs/theme/src/.vuepress/theme.ts b/docs/theme/src/.vuepress/theme.ts index efc9a99f74f9..385787df3136 100644 --- a/docs/theme/src/.vuepress/theme.ts +++ b/docs/theme/src/.vuepress/theme.ts @@ -1,4 +1,4 @@ -import { hopeTheme } from "vuepress-theme-hope"; +import { theme } from "docs-shared"; import { enNavbarConfig, zhNavbarConfig, @@ -10,40 +10,9 @@ import { ruSidebarConfig, } from "./sidebar/index.js"; -const IS_GITEE = "GITEE" in process.env; -const IS_NETLIFY = "NETLIFY" in process.env; -const IS_GITHUB = !IS_GITEE && !IS_NETLIFY; - -const canonical = `https://theme-hope.vuejs.press`; - -const hostname = IS_GITHUB - ? "https://vuepress-theme-hope.github.io" - : IS_GITEE - ? "https://vuepress-theme-hope.gitee.io" - : canonical; - -export default hopeTheme({ - hostname, - - author: { - name: "Mr.Hope", - url: "https://mrhope.site", - }, - - iconAssets: "iconfont", - +export default theme("theme", { repo: "vuepress-theme-hope/vuepress-theme-hope", - docsDir: "docs/theme/src", - - logo: "/logo.svg", - - footer: "MIT Licensed | Copyright © 2019-present Mr.Hope", - copyright: false, - displayFooter: true, - - pageInfo: ["Category", "Tag", "ReadingTime"], - blog: { name: "VuePress Theme Hope", }, @@ -54,6 +23,7 @@ export default hopeTheme({ green: "#3eaf7c", orange: "#fb9b5f", }, + fullscreen: true, locales: { @@ -94,14 +64,6 @@ export default hopeTheme({ }, }, - comment: { - provider: "Giscus", - repo: "vuepress-theme-hope/giscus-discussions", - repoId: "R_kgDOG_Pt2A", - category: "Announcements", - categoryId: "DIC_kwDOG_Pt2M4COD69", - }, - copyright: true, mdEnhance: { @@ -247,7 +209,5 @@ export default hopeTheme({ ], }, }, - - seo: hostname === canonical ? {} : { canonical }, }, }); diff --git a/docs/theme/src/faq/common-error.md b/docs/theme/src/faq/common-error.md index 89253704aa07..4288b7029215 100644 --- a/docs/theme/src/faq/common-error.md +++ b/docs/theme/src/faq/common-error.md @@ -47,8 +47,8 @@ Using object format sidebar config means you want to set different sidebar based - If you want to avoid this warning, you need to add sidebar config for rootLocale path, since all pages will fallback to that. - If you want to disable sidebar in current route, set `sidebar: false` in frontmatter. -- If you want to disable sidebar in current folder, add `currentFolderRoute: false` in sidebar config. -- If you want to tell theme that you only want sidebar in routes you set, add `rootLocalePath: false` in sidebar config to tell theme sidebar config is disabled by default. +- If you want to disable sidebar in current folder, add `[currentFolderRoute]: false` in sidebar config. +- If you want to tell theme that you only want sidebar in routes you set, add `[rootLocalePath]: false` in sidebar config to tell theme sidebar config is disabled by default. ## `useXXX() is called without provider` diff --git a/docs/theme/src/ru/faq/common-error.md b/docs/theme/src/ru/faq/common-error.md index e6a16ce9c656..2c756cae11b7 100644 --- a/docs/theme/src/ru/faq/common-error.md +++ b/docs/theme/src/ru/faq/common-error.md @@ -47,8 +47,8 @@ Using object format sidebar config means you want to set different sidebar based - If you want to avoid this warning, you need to add sidebar config for rootLocale path, since all pages will fallback to that. - If you want to disable sidebar in current route, set `sidebar: false` in frontmatter. -- If you want to disable sidebar in current folder, add `currentFolderRoute: false` in sidebar config. -- If you want to tell theme that you only want sidebar in routes you set, add `rootLocalePath: false` in sidebar config to tell theme sidebar config is disabled by default. +- If you want to disable sidebar in current folder, add `[currentFolderRoute]: false` in sidebar config. +- If you want to tell theme that you only want sidebar in routes you set, add `[rootLocalePath]: false` in sidebar config to tell theme sidebar config is disabled by default. ## `useXXX() is called without provider` diff --git a/docs/theme/src/zh/faq/common-error.md b/docs/theme/src/zh/faq/common-error.md index 79589d9e75c5..731d266e080e 100644 --- a/docs/theme/src/zh/faq/common-error.md +++ b/docs/theme/src/zh/faq/common-error.md @@ -47,8 +47,8 @@ CloudFlare 的 Auto Minify 会错误的对 HTML 的空格和换行进行处理 - 如果你想避免这个警告,你需要为当前语言根路径添加侧边栏配置,因为所有页面都会回退到那个配置。 - 如果你想在当前路由中禁用侧边栏,请在 frontmatter 中设置 `sidebar: false`。 -- 如果要在当前文件夹中禁用侧边栏,请在侧边栏配置中添加 `currentFolderRoute: false`。 -- 如果你想告诉主题你仅在设置的路由中需要侧边栏,请在侧边栏配置中添加 `当前语言根路径: false` 以告诉主题侧边栏配置默认禁用。 +- 如果要在当前文件夹中禁用侧边栏,请在侧边栏配置中添加 `[当前文件夹路由]: false`。 +- 如果你想告诉主题你仅在设置的路由中需要侧边栏,请在侧边栏配置中添加 `[当前语言根路径]: false` 以告诉主题侧边栏配置默认禁用。 ## `useXXX() is called without provider`