From 1e0105d53311b3e422f6f31c1f9040d56fa1efe9 Mon Sep 17 00:00:00 2001 From: vanch Date: Wed, 15 Nov 2023 15:20:25 +0800 Subject: [PATCH] up to 1.0.0-rc.25 --- docs/guide/deploy.md | 4 ++++ docs/guide/extending-default-theme.md | 10 +++++----- docs/guide/i18n.md | 2 +- docs/reference/default-theme-search.md | 2 +- docs/reference/site-config.md | 8 ++++---- 5 files changed, 15 insertions(+), 11 deletions(-) diff --git a/docs/guide/deploy.md b/docs/guide/deploy.md index a9289ef..dc627a6 100644 --- a/docs/guide/deploy.md +++ b/docs/guide/deploy.md @@ -286,3 +286,7 @@ Cache-Control: max-age=31536000,immutable ### Edgio 请参阅[创建并部署 VitePress 应用程序到 Edgio](https://docs.edg.io/guides/vitepress)。 + +### Kinsta 静态站点托管 {#kinsta-static-site-hosting} + +你可以按照这些 [说明](https://kinsta.com/docs/vitepress-static-site-example/) 在 [Kinsta](https://kinsta.com/static-site-hosting/) 上部署你的 Vitepress 网站。 diff --git a/docs/guide/extending-default-theme.md b/docs/guide/extending-default-theme.md index 9387025..0191812 100644 --- a/docs/guide/extending-default-theme.md +++ b/docs/guide/extending-default-theme.md @@ -101,9 +101,9 @@ import DefaultTheme from 'vitepress/theme' /** @type {import('vitepress').Theme} */ export default { extends: DefaultTheme, - enhanceApp(ctx) { + enhanceApp({ app }) { // register your custom global components - ctx.app.component('MyGlobalComponent' /* ... */) + app.component('MyGlobalComponent' /* ... */) }, } ``` @@ -119,7 +119,7 @@ export default { extends: DefaultTheme, async enhanceApp({ app }) { // register your custom global components - ctx.app.component('MyGlobalComponent' /* ... */) + app.component('MyGlobalComponent' /* ... */) }, } satisfies Theme ``` @@ -136,7 +136,7 @@ import DefaultTheme from 'vitepress/theme' import MyLayout from './MyLayout.vue' export default { - ...DefaultTheme, + extends: DefaultTheme, // override the Layout with a wrapper component that // injects the slots Layout: MyLayout, @@ -167,7 +167,7 @@ import DefaultTheme from 'vitepress/theme' import MyComponent from './MyComponent.vue' export default { - ...DefaultTheme, + extends: DefaultTheme, Layout() { return h(DefaultTheme.Layout, null, { 'aside-outline-before': () => h(MyComponent), diff --git a/docs/guide/i18n.md b/docs/guide/i18n.md index 10e5606..33e6718 100644 --- a/docs/guide/i18n.md +++ b/docs/guide/i18n.md @@ -82,7 +82,7 @@ docs/ import DefaultTheme from 'vitepress/theme' export default { - ...DefaultTheme, + extends: DefaultTheme, setup() { const { lang } = useData() watchEffect(() => { diff --git a/docs/reference/default-theme-search.md b/docs/reference/default-theme-search.md index 6568f6d..8564782 100644 --- a/docs/reference/default-theme-search.md +++ b/docs/reference/default-theme-search.md @@ -96,7 +96,7 @@ export default defineConfig({ }) ``` -在 [MiniSearch docs](https://lucaong.github.io/minisearch/classes/_minisearch_.minisearch.html)了解更多信息。 +在 [MiniSearch docs](https://lucaong.github.io/minisearch/classes/MiniSearch.MiniSearch.html)了解更多信息。 ### 自定义渲染内容 {#custom-content-renderer} diff --git a/docs/reference/site-config.md b/docs/reference/site-config.md index 4a82127..b381387 100644 --- a/docs/reference/site-config.md +++ b/docs/reference/site-config.md @@ -487,7 +487,7 @@ interface MarkdownOptions extends MarkdownIt.Options { // Add support for your own languages. // https://github.com/shikijs/shiki/blob/main/docs/languages.md#supporting-your-own-languages-with-shiki - languages?: Shiki.ILanguageRegistration + languages?: Shiki.ILanguageRegistration[] // markdown-it-anchor plugin options. // See: https://github.com/valeriangalliat/markdown-it-anchor#usage @@ -498,7 +498,7 @@ interface MarkdownOptions extends MarkdownIt.Options { attrs?: { leftDelimiter?: string rightDelimiter?: string - allowedAttributes?: string[] + allowedAttributes?: Array disable?: boolean } @@ -511,7 +511,7 @@ interface MarkdownOptions extends MarkdownIt.Options { // @mdit-vue/plugin-headers plugin options. // See: https://github.com/mdit-vue/mdit-vue/tree/main/packages/plugin-headers#options - headers?: HeadersPluginOptions + headers?: HeadersPluginOptions | boolean // @mdit-vue/plugin-sfc plugin options. // See: https://github.com/mdit-vue/mdit-vue/tree/main/packages/plugin-sfc#options @@ -538,7 +538,7 @@ interface MarkdownOptions extends MarkdownIt.Options { // You need to install `markdown-it-mathjax3` and set `math` to `true` to enable it. // You can also pass options to `markdown-it-mathjax3` here. // See: https://github.com/tani/markdown-it-mathjax3#customization - math?: any + math?: boolean | any // Global custom container titles container?: {