Skip to content

Commit

Permalink
feat(theme): add hotReload options
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Nov 23, 2022
1 parent dd66584 commit adde3fe
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 1 deletion.
7 changes: 7 additions & 0 deletions docs/theme/src/config/plugins/blog.md
Expand Up @@ -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.
7 changes: 7 additions & 0 deletions docs/theme/src/ru/config/plugins/blog.md
Expand Up @@ -98,3 +98,10 @@ tag:
- По умолчанию: `/timeline/`

Путь маршрута списка временной шкалы.

### hotReload

- Type: `boolean`
- Default: Whether using `--debug` flag

Whether to enable hot reload in the development server.
7 changes: 7 additions & 0 deletions docs/theme/src/zh/config/plugins/blog.md
Expand Up @@ -98,3 +98,10 @@ tag:
- 默认值: `/timeline/`

时间线列表路由路径。

### hotReload

- 类型: `boolean`
- 默认值: 是否在使用 `--debug` 标识

是否需要在开发服务器启用热更新。
2 changes: 2 additions & 0 deletions packages/theme/src/node/plugins/blog.ts
Expand Up @@ -267,5 +267,7 @@ export const getBlogPlugin = (
}),
},
],

...("hotReload" in blogOptions ? { hotReload: blogOptions.hotReload } : {}),
});
};
2 changes: 1 addition & 1 deletion packages/theme/src/shared/options/plugins/blog.ts
@@ -1,7 +1,7 @@
import type { BlogOptions } from "vuepress-plugin-blog2";

export interface BlogPluginOptions
extends Partial<Pick<BlogOptions, "filter">> {
extends Partial<Pick<BlogOptions, "filter" | "hotReload">> {
/**
* Path of article list
*
Expand Down

0 comments on commit adde3fe

Please sign in to comment.