@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 +6 -0
- package/docs/en/configure/app/source/mainEntryName.mdx +28 -0
- package/docs/en/guides/topic-detail/changesets/changelog.mdx +1 -1
- package/docs/en/guides/topic-detail/changesets/commit.mdx +1 -1
- package/docs/en/guides/topic-detail/changesets/release-note.mdx +2 -1
- package/docs/zh/community/blog/overview.md +10 -0
- package/docs/zh/configure/app/source/mainEntryName.mdx +28 -0
- package/docs/zh/guides/basic-features/routes.mdx +1 -1
- package/docs/zh/guides/topic-detail/changesets/changelog.mdx +1 -1
- package/docs/zh/guides/topic-detail/changesets/commit.mdx +1 -1
- package/docs/zh/guides/topic-detail/changesets/release-note.mdx +2 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
@@ -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
|
+
:::
|
@@ -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
|
+
:::
|
package/package.json
CHANGED
@@ -15,14 +15,14 @@
|
|
15
15
|
"modern",
|
16
16
|
"modern.js"
|
17
17
|
],
|
18
|
-
"version": "2.
|
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.
|
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.
|
38
|
-
"@modern-js/doc-tools": "2.
|
39
|
-
"@modern-js/doc-plugin-auto-sidebar": "2.
|
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",
|