@rspress/plugin-llms 2.0.0-beta.21 → 2.0.0-beta.23
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/dist/index.d.ts +2 -2
- package/dist/index.js +8 -4
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import node_path from "node:path";
|
|
2
|
-
import { getSidebarDataGroup, logger, matchPath, normalizeHref, remarkFileCodeBlock,
|
|
2
|
+
import { getSidebarDataGroup, logger, matchPath, normalizeHref, remarkFileCodeBlock, remarkLink, withBase } from "@rspress/core";
|
|
3
3
|
import remark_mdx from "remark-mdx";
|
|
4
4
|
import remark_parse from "remark-parse";
|
|
5
5
|
import remark_stringify from "remark-stringify";
|
|
@@ -92,9 +92,13 @@ const mdxToMdPlugin = ()=>(tree)=>{
|
|
|
92
92
|
function mdxToMd(content, filepath, routeService, base) {
|
|
93
93
|
return unified().use(remark_parse).use(remark_mdx).use(remarkFileCodeBlock, {
|
|
94
94
|
filepath
|
|
95
|
-
}).use(mdxToMdPlugin).use(
|
|
95
|
+
}).use(mdxToMdPlugin).use(remarkLink, {
|
|
96
96
|
cleanUrls: '.md',
|
|
97
97
|
routeService,
|
|
98
|
+
remarkLinkOptions: {
|
|
99
|
+
checkDeadLinks: false,
|
|
100
|
+
autoPrefix: true
|
|
101
|
+
},
|
|
98
102
|
__base: base
|
|
99
103
|
}).use(remark_stringify).process({
|
|
100
104
|
value: content,
|
|
@@ -138,7 +142,7 @@ const rsbuildPluginLlms = ({ disableSSGRef, baseRef, pageDataList, routes, title
|
|
|
138
142
|
const { name } = llmsTxt;
|
|
139
143
|
const llmsTxtContent = generateLlmsTxt(pageArray, navList, others, llmsTxt, titleRef.current, descriptionRef.current, baseRef.current);
|
|
140
144
|
api.processAssets({
|
|
141
|
-
|
|
145
|
+
environments: disableSSG ? [
|
|
142
146
|
'web'
|
|
143
147
|
] : [
|
|
144
148
|
'node'
|
|
@@ -170,7 +174,7 @@ const rsbuildPluginLlms = ({ disableSSGRef, baseRef, pageDataList, routes, title
|
|
|
170
174
|
mdContents[outFilePath] = mdContent.toString();
|
|
171
175
|
}) ?? []);
|
|
172
176
|
if (mdFiles) api.processAssets({
|
|
173
|
-
|
|
177
|
+
environments: disableSSG ? [
|
|
174
178
|
'web'
|
|
175
179
|
] : [
|
|
176
180
|
'node'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspress/plugin-llms",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.23",
|
|
4
4
|
"description": "A plugin for rspress to generate llms.txt, llms-full.txt, md files to let llm understand your website.",
|
|
5
5
|
"bugs": "https://github.com/web-infra-dev/rspress/issues",
|
|
6
6
|
"repository": {
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"unist-util-visit-children": "^3.0.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@microsoft/api-extractor": "^7.52.
|
|
30
|
-
"@rsbuild/core": "~1.4.
|
|
31
|
-
"@rslib/core": "0.
|
|
29
|
+
"@microsoft/api-extractor": "^7.52.9",
|
|
30
|
+
"@rsbuild/core": "~1.4.11",
|
|
31
|
+
"@rslib/core": "0.11.0",
|
|
32
32
|
"@types/hast": "^3.0.4",
|
|
33
33
|
"@types/node": "^22.8.1",
|
|
34
34
|
"typescript": "^5.8.2",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@rspress/config": "1.0.0"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"rspress": "^2.0.0-beta.
|
|
39
|
+
"@rspress/core": "^2.0.0-beta.23"
|
|
40
40
|
},
|
|
41
41
|
"engines": {
|
|
42
42
|
"node": ">=18.0.0"
|