Skip to content

Commit e7aebe7

Browse files
committed
fix: compatibility issues
1 parent b2c04a8 commit e7aebe7

File tree

6 files changed

+16
-23
lines changed

6 files changed

+16
-23
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ jobs:
1414
strategy:
1515
matrix:
1616
node:
17-
- 20
17+
# https://github.com/web-infra-dev/rspress/pull/2923
18+
# - 20
1819
- 22
1920
- 24
2021
os:

packages/doom/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
"@rsbuild/plugin-yaml": "^1.0.3",
5252
"@rspress/core": "2.0.0-rc.3",
5353
"@rspress/plugin-algolia": "2.0.0-rc.3",
54-
"@rspress/plugin-llms": "2.0.0-rc.3",
5554
"@rspress/plugin-sitemap": "2.0.0-rc.3",
5655
"@rspress/shared": "2.0.0-rc.3",
5756
"@shikijs/transformers": "^3.20.0",

packages/doom/src/cli/load-config.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { pluginSvgr } from '@rsbuild/plugin-svgr'
99
import { pluginYaml } from '@rsbuild/plugin-yaml'
1010
import { logger, type UserConfig } from '@rspress/core'
1111
import { pluginAlgolia } from '@rspress/plugin-algolia'
12-
import { pluginLlms } from '@rspress/plugin-llms'
1312
import { pluginSitemap } from '@rspress/plugin-sitemap'
1413
import {
1514
addLeadingSlash,
@@ -276,7 +275,6 @@ const getCommonConfig = async ({
276275
},
277276
plugins: [
278277
algoliaOptions && pluginAlgolia(),
279-
pluginLlms(),
280278
siteUrl &&
281279
config.siteUrl &&
282280
pluginSitemap({

packages/doom/src/plugins/auto-sidebar/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,12 @@ export const autoSidebar = async (
225225
const exclude = (route.exclude ??= [])
226226
exclude.push(...excludeRoutes)
227227
// only exclude apis routes for sidebar but not site data to avoid dead links
228-
if (export_ && !onlyIncludeRoutes.some((route) => APIS_ROUTES.has(route))) {
228+
if (
229+
export_ &&
230+
!onlyIncludeRoutes.some(
231+
(route) => route.startsWith('apis/') || route.startsWith('*/apis/'),
232+
)
233+
) {
229234
excludeRoutes.push(...APIS_ROUTES)
230235
}
231236
}

packages/doom/src/plugins/global/index.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,18 @@ export const globalPlugin = ({
7474
}
7575
},
7676
addPages(config) {
77-
const loginPath = baseResolve('login')
77+
let loginPath: string
78+
for (const ext of ['.js', '.tsx']) {
79+
loginPath = baseResolve(`login/index${ext}`)
80+
if (fs.existsSync(loginPath)) {
81+
break
82+
}
83+
}
7884
if ((config.themeConfig?.locales?.length ?? 0) < 1) {
7985
return [
8086
{
8187
routePath: '/login',
82-
filepath: loginPath,
88+
filepath: loginPath!,
8389
},
8490
]
8591
}

yarn.lock

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ __metadata:
8787
"@rsbuild/plugin-yaml": "npm:^1.0.3"
8888
"@rspress/core": "npm:2.0.0-rc.3"
8989
"@rspress/plugin-algolia": "npm:2.0.0-rc.3"
90-
"@rspress/plugin-llms": "npm:2.0.0-rc.3"
9190
"@rspress/plugin-sitemap": "npm:2.0.0-rc.3"
9291
"@rspress/shared": "npm:2.0.0-rc.3"
9392
"@shikijs/transformers": "npm:^3.20.0"
@@ -3150,21 +3149,6 @@ __metadata:
31503149
languageName: node
31513150
linkType: hard
31523151

3153-
"@rspress/plugin-llms@npm:2.0.0-rc.3":
3154-
version: 2.0.0-rc.3
3155-
resolution: "@rspress/plugin-llms@npm:2.0.0-rc.3"
3156-
dependencies:
3157-
remark-mdx: "npm:^3.1.1"
3158-
remark-parse: "npm:^11.0.0"
3159-
remark-stringify: "npm:^11.0.0"
3160-
unified: "npm:^11.0.5"
3161-
unist-util-visit: "npm:^5.0.0"
3162-
peerDependencies:
3163-
"@rspress/core": ^2.0.0-rc.3
3164-
checksum: 10c0/f37c43a865052ca9c6f613e4ebe221cd95dae3c23b722b113c1e896460d0ed5366a85ee7a1e4e23b60dc96731ceb86608866ee40c3a0a8c272f5700ed62d46bc
3165-
languageName: node
3166-
linkType: hard
3167-
31683152
"@rspress/plugin-sitemap@npm:2.0.0-rc.3":
31693153
version: 2.0.0-rc.3
31703154
resolution: "@rspress/plugin-sitemap@npm:2.0.0-rc.3"

0 commit comments

Comments
 (0)