@modern-js/main-doc 2.23.1 → 2.24.0

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @modern-js/main-doc
2
2
 
3
+ ## 2.24.0
4
+
5
+ ### Patch Changes
6
+
7
+ - @modern-js/builder-doc@2.24.0
8
+
3
9
  ## 2.23.1
4
10
 
5
11
  ### Patch Changes
@@ -0,0 +1,28 @@
1
+ ---
2
+ sidebar_label: mainEntryName
3
+ ---
4
+
5
+ # source.mainEntryName
6
+
7
+ - **Type:** `string`
8
+ - **Default value:** `main`
9
+
10
+ This option is used to configure the main entry name of Modern.js.
11
+
12
+ By default, the default main entry name of Modern.js is `main`. When using a single entry or the entry name is the same as the `name` field in `package.json`, the corresponding entry will be used as the main entry. This configuration can be used to modify the name of the main entry.
13
+
14
+ For example, change the main entry name to index:
15
+
16
+ ```ts title="modern.config.ts"
17
+ export default defineConfig({
18
+ source: {
19
+ mainEntryName: 'index',
20
+ },
21
+ });
22
+ ```
23
+
24
+ After building, the corresponding HTML output path will be changed to `dist/html/index/index.html`.
25
+
26
+ :::info
27
+ When the main entry name is modified, other `**ByEntries` configurations also need to be adjusted to use the modified entry name.
28
+ :::
@@ -220,7 +220,7 @@ export async function getDependencyReleaseLine() {}
220
220
  ```json title="package.json"
221
221
  {
222
222
  "devDependencies": {
223
- "custom-changelog": "workspace: *",
223
+ "custom-changelog": "workspace:*",
224
224
  ...
225
225
  }
226
226
  }
@@ -251,7 +251,7 @@ export async function getVersionMessage() {}
251
251
  ```json title="package.json"
252
252
  {
253
253
  "devDependencies": {
254
- "custom-commit": "workspace: *",
254
+ "custom-commit": "workspace:*",
255
255
  ...
256
256
  }
257
257
  }
@@ -259,8 +259,9 @@ export function getReleaseNoteLine() {}
259
259
  ```json title="package.json"
260
260
  {
261
261
  "devDependencies": {
262
- "custom-release-note": "workspace: *",
262
+ "custom-release-note": "workspace:*",
263
263
  ...
264
+ }
264
265
  }
265
266
  ```
266
267
 
@@ -10,6 +10,16 @@ sidebar_position: 1
10
10
 
11
11
  ---
12
12
 
13
+ ## AIGC 如何影响下一代文档搜索方案?
14
+
15
+ > 发表于 2023.05.11
16
+
17
+ 对于一个文档站点来说,搜索是一个很重要的功能,它可以帮助用户在繁杂的文档中快速找到自己想要的内容。而随着 AIGC(人工智能生成内容)技术的发展,文档搜索领域也正在悄然发生变化。借助 AI 强大的自然语言处理能力和上下文理解能力,我们可以把文档搜索做得更加智能化。本文将会介绍 AIGC 在文档中应用的技术原理,并分析一些业界已有的 AI 搜索产品。
18
+
19
+ [了解更多 →](https://mp.weixin.qq.com/s/OGuixAbvbIYr2viQrOrPXg)
20
+
21
+ ---
22
+
13
23
  ## Modern.js v2 发布:支持 Rspack 构建
14
24
 
15
25
  > 发表于 2023.03.16
@@ -0,0 +1,28 @@
1
+ ---
2
+ sidebar_label: mainEntryName
3
+ ---
4
+
5
+ # source.mainEntryName
6
+
7
+ - **类型:** `string`
8
+ - **默认值:** `main`
9
+
10
+ 该选项用于配置 Modern.js 的主入口名称。
11
+
12
+ 默认情况下,Modern.js 的默认主入口名称为 `main`,当使用单入口或者入口名称和 `package.json` 中 name 字段一致时,会将对应入口作为主入口,通过该配置可以修改主入口的名称。
13
+
14
+ 比如将主入口名称改为 index:
15
+
16
+ ```ts title="modern.config.ts"
17
+ export default defineConfig({
18
+ source: {
19
+ mainEntryName: 'index',
20
+ },
21
+ });
22
+ ```
23
+
24
+ 构建之后,对应 html 产物路径将会变为 `dist/html/index/index.html`。
25
+
26
+ :::info
27
+ 当修改主入口名称后,其他 `**ByEntries` 的配置也需要对应调整使用修改后的入口名称。
28
+ :::
@@ -171,7 +171,7 @@ export default () => {
171
171
 
172
172
  ### 动态可选路由
173
173
 
174
- 通过 `[$]` 命名的文件目录,生成的路由会作为动态路由。例如以下文件目录:
174
+ 通过 `[$]` 命名的文件目录,生成的路由会作为动态可选路由。例如以下文件目录:
175
175
 
176
176
  ```bash
177
177
  └── routes
@@ -220,7 +220,7 @@ export async function getDependencyReleaseLine() {}
220
220
  ```json title="package.json"
221
221
  {
222
222
  "devDependencies": {
223
- "custom-changelog": "workspace: *",
223
+ "custom-changelog": "workspace:*",
224
224
  ...
225
225
  }
226
226
  }
@@ -251,7 +251,7 @@ export async function getVersionMessage() {}
251
251
  ```json title="package.json"
252
252
  {
253
253
  "devDependencies": {
254
- "custom-commit": "workspace: *",
254
+ "custom-commit": "workspace:*",
255
255
  ...
256
256
  }
257
257
  }
@@ -259,8 +259,9 @@ export function getReleaseNoteLine() {}
259
259
  ```json title="package.json"
260
260
  {
261
261
  "devDependencies": {
262
- "custom-release-note": "workspace: *",
262
+ "custom-release-note": "workspace:*",
263
263
  ...
264
+ }
264
265
  }
265
266
  ```
266
267
 
package/package.json CHANGED
@@ -15,14 +15,14 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.23.1",
18
+ "version": "2.24.0",
19
19
  "publishConfig": {
20
20
  "registry": "https://registry.npmjs.org/",
21
21
  "access": "public",
22
22
  "provenance": true
23
23
  },
24
24
  "peerDependencies": {
25
- "@modern-js/builder-doc": "^2.23.1"
25
+ "@modern-js/builder-doc": "^2.24.0"
26
26
  },
27
27
  "devDependencies": {
28
28
  "classnames": "^2",
@@ -34,9 +34,9 @@
34
34
  "fs-extra": "^10",
35
35
  "@types/node": "^16",
36
36
  "@types/fs-extra": "^9",
37
- "@modern-js/builder-doc": "2.23.1",
38
- "@modern-js/doc-tools": "2.23.1",
39
- "@modern-js/doc-plugin-auto-sidebar": "2.23.1"
37
+ "@modern-js/builder-doc": "2.24.0",
38
+ "@modern-js/doc-tools": "2.24.0",
39
+ "@modern-js/doc-plugin-auto-sidebar": "2.24.0"
40
40
  },
41
41
  "scripts": {
42
42
  "dev": "modern dev",