rspress-plugin-gh-pages 0.1.4 → 0.1.6-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/README.md +2 -0
- package/README.zh-CN.md +63 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# rspress-plugin-gh-pages
|
|
2
2
|
|
|
3
|
+
## 0.1.6-beta.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [2891f27]
|
|
8
|
+
- rspress-plugin-devkit@0.1.3-beta.0
|
|
9
|
+
|
|
10
|
+
## 0.1.5
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [932dbb7]
|
|
15
|
+
- rspress-plugin-devkit@0.1.2
|
|
16
|
+
|
|
17
|
+
## 0.1.5-beta.0
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies [932dbb7]
|
|
22
|
+
- rspress-plugin-devkit@0.1.2-beta.0
|
|
23
|
+
|
|
3
24
|
## 0.1.4
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# rspress-plugin-gh-pages 
|
|
2
2
|
|
|
3
|
+
[简体中文](./README.zh-CN.md)
|
|
4
|
+
|
|
3
5
|
Rspress plugin to add support for automatic deployment to GitHub Pages.
|
|
4
6
|
|
|
5
7
|
- **No need to push the code and wait for the pages to be updated**: Every time you run `rspress build`, the plugin will automatically push the generated files to the specified `gh-pages` branch of the repository
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# rspress-plugin-gh-pages 
|
|
2
|
+
|
|
3
|
+
提供 GitHub Pages 自动部署支持的 Rspress 插件。
|
|
4
|
+
|
|
5
|
+
- **无需推送代码后寂寞等待页面更新**: 每次运行 `rspress build` 时,插件会自动将生成的静态资源推送到指定仓库的指定分支。
|
|
6
|
+
- **无需复杂的持续集成配置**: 插件仅会将静态文件推送到指定的分支,而无需等待云端构建流程,因此页面更新生效速度更快。
|
|
7
|
+
|
|
8
|
+
## 使用
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm i rspress-plugin-gh-pages
|
|
12
|
+
pnpm add rspress-plugin-gh-pages
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import * as path from 'path';
|
|
17
|
+
import { defineConfig } from 'rspress/config';
|
|
18
|
+
import ghPages from 'rspress-plugin-gh-pages';
|
|
19
|
+
|
|
20
|
+
export default defineConfig({
|
|
21
|
+
root: path.join(__dirname, 'docs'),
|
|
22
|
+
plugins: [
|
|
23
|
+
ghpages({
|
|
24
|
+
repo: 'https://github.com/linbudu599/rspress-plugins.git',
|
|
25
|
+
branch: 'website',
|
|
26
|
+
}),
|
|
27
|
+
],
|
|
28
|
+
});
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## 配置
|
|
32
|
+
|
|
33
|
+
## directory
|
|
34
|
+
|
|
35
|
+
将要推送到 `gh-pages` 分支的目标目录,如果未指定此配置,则将使用 `config.outDir`。
|
|
36
|
+
|
|
37
|
+
- Type: `string`
|
|
38
|
+
|
|
39
|
+
## siteBase
|
|
40
|
+
|
|
41
|
+
配置站点的基础路径,可以理解为 `publicPath`.
|
|
42
|
+
|
|
43
|
+
- Type: `string`
|
|
44
|
+
|
|
45
|
+
当部署到 `<user>/awesome-plugins` 仓库时,需要将 `siteBase` 配置设置为 `/awesome-plugins`,因为页面将托管在 `https://<user>.github.io/awesome-plugins`。
|
|
46
|
+
|
|
47
|
+
默认情况下,该插件会尝试解析 `repo` 选项以获取 `siteBase` 值(如果 repo 是一个 `github.io` 类型的仓库,则 `siteBase` 将是 `/`,否则,`siteBase` 将是 `/<repo-name>`),你也可以指定 `siteBase` 选项来覆盖默认值。
|
|
48
|
+
|
|
49
|
+
## silent
|
|
50
|
+
|
|
51
|
+
禁用此插件的终端日志输出。
|
|
52
|
+
|
|
53
|
+
- Type: `boolean`
|
|
54
|
+
- Default: false
|
|
55
|
+
|
|
56
|
+
## repo
|
|
57
|
+
|
|
58
|
+
- Type: `string`
|
|
59
|
+
- `Required`
|
|
60
|
+
|
|
61
|
+
将要部署到的仓库,你也可以指定另一个仓库来部署。
|
|
62
|
+
|
|
63
|
+
更多选项可以在 [gh-pages](https://github.com/tschaub/gh-pages) 找到。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rspress-plugin-gh-pages",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6-beta.0",
|
|
4
4
|
"description": "Rspress plugin that add support for automatic deployment to GitHub Pages",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rspress",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@rspress/shared": "^1.17.1",
|
|
28
28
|
"chalk": "^5.3.0",
|
|
29
29
|
"gh-pages": "^6.1.1",
|
|
30
|
-
"rspress-plugin-devkit": "^0.1.
|
|
30
|
+
"rspress-plugin-devkit": "^0.1.3-beta.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/gh-pages": "^6.1.0",
|