diff --git a/docs/theme/src/config/plugins/blog.md b/docs/theme/src/config/plugins/blog.md index 241799e66406..9ceb1ca790af 100644 --- a/docs/theme/src/config/plugins/blog.md +++ b/docs/theme/src/config/plugins/blog.md @@ -98,3 +98,10 @@ Star article list route path. - Default: `/timeline/` Timeline list route path. + +### hotReload + +- Type: `boolean` +- Default: Whether using `--debug` flag + +Whether to enable hot reload in the development server. diff --git a/docs/theme/src/ru/config/plugins/blog.md b/docs/theme/src/ru/config/plugins/blog.md index d527d09f03e3..1d97fea12e1d 100644 --- a/docs/theme/src/ru/config/plugins/blog.md +++ b/docs/theme/src/ru/config/plugins/blog.md @@ -98,3 +98,10 @@ tag: - По умолчанию: `/timeline/` Путь маршрута списка временной шкалы. + +### hotReload + +- Type: `boolean` +- Default: Whether using `--debug` flag + +Whether to enable hot reload in the development server. diff --git a/docs/theme/src/zh/config/plugins/blog.md b/docs/theme/src/zh/config/plugins/blog.md index 513a0e4abac9..f6017a1ae2fc 100644 --- a/docs/theme/src/zh/config/plugins/blog.md +++ b/docs/theme/src/zh/config/plugins/blog.md @@ -98,3 +98,10 @@ tag: - 默认值: `/timeline/` 时间线列表路由路径。 + +### hotReload + +- 类型: `boolean` +- 默认值: 是否在使用 `--debug` 标识 + +是否需要在开发服务器启用热更新。 diff --git a/packages/theme/src/node/plugins/blog.ts b/packages/theme/src/node/plugins/blog.ts index d01fc7d3804e..28a8f49b9867 100644 --- a/packages/theme/src/node/plugins/blog.ts +++ b/packages/theme/src/node/plugins/blog.ts @@ -267,5 +267,7 @@ export const getBlogPlugin = ( }), }, ], + + ...("hotReload" in blogOptions ? { hotReload: blogOptions.hotReload } : {}), }); }; diff --git a/packages/theme/src/shared/options/plugins/blog.ts b/packages/theme/src/shared/options/plugins/blog.ts index fee4daa6b2fc..d781188da0a2 100644 --- a/packages/theme/src/shared/options/plugins/blog.ts +++ b/packages/theme/src/shared/options/plugins/blog.ts @@ -1,7 +1,7 @@ import type { BlogOptions } from "vuepress-plugin-blog2"; export interface BlogPluginOptions - extends Partial> { + extends Partial> { /** * Path of article list *