Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/perfect-rings-punch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@alauda/doom": minor
---

feat: bump `rspress` to `v2.0.0-beta.21`
2 changes: 1 addition & 1 deletion docs/en/usage/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ Please use `public/robots.txt` for Algolia crawler verification.

Due to current architectural limitations of `rspress`, Algolia search functionality must be implemented via [custom themes](https://rspress.dev/zh/guide/advanced/custom-theme). To unify the use of related theme features, we provide the `@alauda/doom/theme` theme entry. Please add the following theme configuration file to enable:

```ts title "theme/index.ts"
```ts title="theme/index.ts"
export * from '@alauda/doom/theme'
```

Expand Down
4 changes: 2 additions & 2 deletions docs/en/usage/mdx.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ The `rspress` theme provides a majority of the [built-in components](https://rsp
- `Tab/Tabs`
- `Toc`

Other less frequently used components can be imported from `@rspress/core/theme`, for example:
Other less frequently used components can be imported from `rspress/theme`, for example:

```mdx title="preview.mdx"
import { SourceCode } from '@rspress/core/theme'
import { SourceCode } from 'rspress/theme'

<SourceCode href="/" />
```
Expand Down
2 changes: 1 addition & 1 deletion docs/zh/usage/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ algolia: # 可选,Algolia 搜索配置,仅当启用 `-a, --algolia` 命令

由于 `rspress` 当前架构限制,使用 Algolia 搜索功能需通过[自定义主题](https://rspress.dev/zh/guide/advanced/custom-theme) 实现,因此为统一使用相关主题功能,我们提供了 `@alauda/doom/theme` 主题入口,请添加以下主题配置文件启用:

```ts title "theme/index.ts"
```ts title="theme/index.ts"
export * from '@alauda/doom/theme'
```

Expand Down
4 changes: 2 additions & 2 deletions docs/zh/usage/mdx.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ weight: 3
- `Tab/Tabs`
- `Toc`

其他不常用的组件可以通过 `@rspress/core/theme` 导入使用,例如:
其他不常用的组件可以通过 `rspress/theme` 导入使用,例如:

```mdx title="preview.mdx"
import { SourceCode } from '@rspress/core/theme'
import { SourceCode } from 'rspress/theme'

<SourceCode href="/" />
```
Expand Down
2 changes: 1 addition & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import doom from '@alauda/doom/eslint'

export default config(
{
ignores: ['pyodide'],
ignores: ['dist', 'lib', 'pyodide'],
},
...(await doom(new URL('docs', import.meta.url))),
eslint.configs.recommended,
Expand Down
4 changes: 2 additions & 2 deletions fixture-docs/en/index.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useI18n } from '@rspress/core/runtime'
import { useI18n } from 'rspress/runtime'

# {useI18n()('prod_intro')} \{#prod_intro_i18n\}

<Term name="company" /> <Term name="product" /> <Term name="productShort" />
## <Term name="company" /> <Term name="product" /> <Term name="productShort" />

The following specifications must be followed during the internationalization translation process:

Expand Down
2 changes: 1 addition & 1 deletion fixture-docs/ru/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sourceSHA: 7f15c9e90978c98f9621efe840a5f243bd12b7c53b495af9b5a0c03fdd349e91
---

import { useI18n } from '@rspress/core/runtime'
import { useI18n } from 'rspress/runtime'

# {useI18n()('prod_intro')} \{#prod_intro_i18n}

Expand Down
2 changes: 1 addition & 1 deletion fixture-docs/zh/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sourceSHA: 7f15c9e90978c98f9621efe840a5f243bd12b7c53b495af9b5a0c03fdd349e91
---

import { useI18n } from '@rspress/core/runtime'
import { useI18n } from 'rspress/runtime'

# {useI18n()('prod_intro')} \{#prod_intro_i18n}

Expand Down
35 changes: 18 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,27 +58,27 @@
"version": "changeset version && yarn --no-immutable"
},
"dependencies": {
"@cspell/eslint-plugin": "^8.19.4 || ^9.1.3",
"@eslint-react/eslint-plugin": "^1.52.2",
"@cspell/eslint-plugin": "^8.19.4 || ^9.1.5",
"@eslint-react/eslint-plugin": "^1.52.3",
"@inquirer/prompts": "^7.6.0",
"@openapi-contrib/openapi-schema-to-json-schema": "^5.1.0",
"@playwright/browser-chromium": "^1.53.2",
"@playwright/browser-chromium": "^1.54.1",
"@rsbuild/plugin-react": "^1.3.4",
"@rsbuild/plugin-sass": "^1.3.3",
"@rsbuild/plugin-svgr": "^1.2.1",
"@rsbuild/plugin-yaml": "^1.0.2",
"@rspress/core": "2.0.0-beta.20",
"@rspress/plugin-algolia": "2.0.0-beta.20",
"@rspress/plugin-llms": "2.0.0-beta.20",
"@shikijs/transformers": "^3.7.0",
"@rspress/plugin-algolia": "2.0.0-beta.21",
"@rspress/plugin-llms": "2.0.0-beta.21",
"@rspress/shared": "2.0.0-beta.21",
"@shikijs/transformers": "^3.8.0",
"@total-typescript/ts-reset": "^0.6.1",
"chokidar": "^4.0.3",
"cli-progress": "^3.12.0",
"clsx": "^2.1.1",
"commander": "^13.1.0 || ^14.0.0",
"ejs": "^3.1.10",
"es-toolkit": "^1.39.7",
"eslint": "^9.30.1",
"eslint": "^9.31.0",
"eslint-plugin-mdx": "^3.6.2",
"globals": "^16.3.0",
"html-tag-names": "^2.1.0",
Expand All @@ -88,13 +88,13 @@
"mdast-util-phrasing": "^4.1.0",
"mdast-util-to-string": "^4.0.0",
"mermaid": "^11.8.1",
"openai": "^5.8.3",
"openai": "^5.9.2",
"openapi-types": "^12.1.3",
"p-ratelimit": "^1.0.1",
"pdf-lib": "^1.17.1",
"pdf-merger-js": "^5.1.2",
"picomatch": "^4.0.2",
"playwright": "^1.53.2",
"picomatch": "^4.0.3",
"playwright": "^1.54.1",
"pluralize": "^8.0.0",
"react-markdown": "^10.1.0",
"rehype-raw": "^7.0.0",
Expand All @@ -114,14 +114,15 @@
"remark-mdx": "^3.1.0",
"remark-message-control": "^8.0.0",
"remark-stringify": "^11.0.0",
"shiki": "^3.7.0",
"rspress": "2.0.0-beta.21",
"shiki": "^3.8.0",
"simple-git": "^3.28.0",
"string-width": "^7.2.0",
"swagger2openapi": "^7.0.8",
"tinyglobby": "^0.2.14",
"type-fest": "^4.41.0",
"typescript": "^5.8.3",
"typescript-eslint": "^8.36.0",
"typescript-eslint": "^8.37.0",
"unified": "^11.0.5",
"unified-lint-rule": "^3.0.1",
"unist-util-position": "^5.0.0",
Expand All @@ -133,13 +134,13 @@
"devDependencies": {
"@changesets/changelog-github": "^0.5.1",
"@changesets/cli": "^2.29.5",
"@eslint/js": "^9.30.1",
"@eslint/js": "^9.31.0",
"@swc-node/register": "^1.10.10",
"@swc/core": "1.12.11",
"@swc/core": "1.12.14",
"@types/cli-progress": "^3.11.6",
"@types/ejs": "^3.1.5",
"@types/mdast": "^4.0.4",
"@types/node": "^22.16.2",
"@types/node": "^22.16.4",
"@types/picomatch": "^4.0.0",
"@types/pluralize": "^0.0.33",
"@types/react": "^19.1.8",
Expand All @@ -154,7 +155,7 @@
"nano-staged": "^0.8.0",
"npm-run-all2": "^8.0.4",
"prettier": "^3.6.2",
"prettier-plugin-pkg": "^0.21.1",
"prettier-plugin-pkg": "^0.21.2",
"prettier-plugin-properties": "^0.3.0",
"simple-git-hooks": "^2.13.0",
"type-coverage": "^2.29.7",
Expand Down
4 changes: 2 additions & 2 deletions src/cli/export.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import fs from 'node:fs/promises'
import path from 'node:path'

import { removeLeadingSlash, serve } from '@rspress/core'
import { logger } from '@rspress/shared/logger'
import { removeLeadingSlash } from '@rspress/shared'
import { Command } from 'commander'
import { logger, serve } from 'rspress/core'
import { cyan, yellow } from 'yoctocolors'

import {
Expand Down
2 changes: 1 addition & 1 deletion src/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import module from 'node:module'
import path from 'node:path'

import { logger } from '@rsbuild/core'
import { build, dev, serve } from '@rspress/core'
import { type FSWatcher, watch } from 'chokidar'
import { type Command, program } from 'commander'
import { build, dev, serve } from 'rspress/core'
import { green } from 'yoctocolors'

import type { GlobalCliOptions, ServeOptions } from '../types.js'
Expand Down
2 changes: 1 addition & 1 deletion src/cli/lint.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import path from 'node:path'

import { logger } from '@rspress/shared/logger'
import { Command } from 'commander'
import { ESLint } from 'eslint'
import { logger } from 'rspress/core'
import { cyan } from 'yoctocolors'

import doom from '../eslint.js'
Expand Down
13 changes: 4 additions & 9 deletions src/cli/load-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,16 @@ import { pluginReact } from '@rsbuild/plugin-react'
import { pluginSass } from '@rsbuild/plugin-sass'
import { pluginSvgr } from '@rsbuild/plugin-svgr'
import { pluginYaml } from '@rsbuild/plugin-yaml'
import { pluginAlgolia } from '@rspress/plugin-algolia'
import { pluginLlms } from '@rspress/plugin-llms'
import {
addLeadingSlash,
addTrailingSlash,
normalizeSlash,
removeLeadingSlash,
type LocaleConfig,
type UserConfig,
} from '@rspress/core'
import { pluginAlgolia } from '@rspress/plugin-algolia'
import { pluginLlms } from '@rspress/plugin-llms'
import { logger } from '@rspress/shared/logger'
} from '@rspress/shared'
import {
transformerMetaHighlight,
transformerMetaWordHighlight,
Expand All @@ -28,6 +27,7 @@ import {
transformerRemoveNotationEscape,
} from '@shikijs/transformers'
import { difference } from 'es-toolkit'
import { logger } from 'rspress/core'
import { glob } from 'tinyglobby'
import { cyan } from 'yoctocolors'

Expand Down Expand Up @@ -328,11 +328,6 @@ const getCommonConfig = async ({
server: {
open,
},
performance: {
buildCache: {
cacheDigest: [root, configFilePath, base, version],
},
},
tools: {
rspack(rspackConfig, { mergeConfig, rspack }) {
return mergeConfig(rspackConfig, {
Expand Down
2 changes: 1 addition & 1 deletion src/cli/translate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import { setTimeout } from 'node:timers/promises'
import { isDeepStrictEqual } from 'node:util'

import { removeLeadingSlash } from '@rspress/shared'
import { logger } from '@rspress/shared/logger'
import { Command } from 'commander'
import { render } from 'ejs'
import matter from 'gray-matter'
import { AzureOpenAI, RateLimitError } from 'openai'
import { pRateLimit } from 'p-ratelimit'
import { logger } from 'rspress/core'
import { glob } from 'tinyglobby'
import { cyan, red } from 'yoctocolors'

Expand Down
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import type { Config } from '@rspress/core'
import type { Config } from '@rspress/shared'

export const defineConfig = (config: Config) => config
2 changes: 1 addition & 1 deletion src/global/SiteOverrides/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { usePageData } from '@rspress/core/runtime'
import { useEffect } from 'react'
import { usePageData } from 'rspress/runtime'

import { useSiteOverrides } from '@alauda/doom/runtime'

Expand Down
2 changes: 1 addition & 1 deletion src/global/VersionsNav/NavMenuGroup.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Tag } from '@rspress/core/theme'
import {
isExternalUrl,
type NavItem,
Expand All @@ -7,6 +6,7 @@ import {
type NavItemWithLinkAndChildren,
} from '@rspress/shared'
import { useRef, useState, type ReactNode } from 'react'
import { Tag } from 'rspress/theme'

import { matchNavbar } from '../../shared/index.js'

Expand Down
2 changes: 1 addition & 1 deletion src/global/VersionsNav/NavMenuSingleItem.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Tag } from '@rspress/core/theme'
import { isExternalUrl, type NavItemWithLink } from '@rspress/shared'
import { useMemo, type ReactNode } from 'react'
import { Tag } from 'rspress/theme'

import styles from '../../../styles/versions-nav.module.scss'
import { withoutBase } from '../../shared/index.js'
Expand Down
7 changes: 1 addition & 6 deletions src/global/VersionsNav/index.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
import {
isProduction,
NoSSR,
usePageData,
withBase,
} from '@rspress/core/runtime'
import { type NavItem } from '@rspress/shared'
import virtual from 'doom-@global-virtual'
import { noop } from 'es-toolkit'
import { useEffect, useMemo, useState } from 'react'
import { createPortal } from 'react-dom'
import { isProduction, NoSSR, usePageData, withBase } from 'rspress/runtime'
import { base } from 'virtual-runtime-config'
import { parse } from 'yaml'

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/api/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { openapiSchemaToJsonSchema } from '@openapi-contrib/openapi-schema-to-json-schema'
import type { RspressPlugin } from '@rspress/core'
import type { OpenAPI, OpenAPIV3_1 } from 'openapi-types'
import type { RspressPlugin } from 'rspress/core'
import { convertObj } from 'swagger2openapi'

import { generateRuntimeModule } from '../../utils/index.js'
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/attributes/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { Plugin } from '@rspress/core'
import type { RspressPlugin } from 'rspress/core'

import { remarkAttributes } from './remark-attributes/index.js'

export const attributesPlugin = (): Plugin => {
export const attributesPlugin = (): RspressPlugin => {
return {
name: 'doom-attributes',
markdown: {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/auto-sidebar/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
addTrailingSlash,
type RspressPlugin,
type UserConfig,
} from '@rspress/core'
} from '@rspress/shared'

import { APIS_ROUTES } from '../../shared/index.js'

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/auto-sidebar/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import fs from 'node:fs/promises'
import path from 'node:path'

import type { NavItem } from '@rspress/shared'
import { logger } from '@rspress/shared/logger'
import { loadFrontMatter } from '@rspress/shared/node-utils'
import { logger } from 'rspress/core'

import { extractTextAndId } from '../../shared/index.js'
import { pathExists } from '../../utils/index.js'
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/auto-sidebar/walk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import {
slash,
withBase,
} from '@rspress/shared'
import { logger } from '@rspress/shared/logger'
import { unset } from 'es-toolkit/compat'
import picomatch from 'picomatch'
import { logger } from 'rspress/core'

import { pathExists, readJson } from '../../utils/index.js'

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/auto-toc/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { RspressPlugin } from '@rspress/core'
import type { RspressPlugin } from 'rspress/core'

import { remarkAutoToc } from './remark-auto-toc.js'

Expand Down
4 changes: 2 additions & 2 deletions src/plugins/directives/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { Plugin } from '@rspress/core'
import remarkDirective from 'remark-directive'
import type { RspressPlugin } from 'rspress/core'

import { remarkDirectives } from './remark-directives.js'

export const directivesPlugin = (): Plugin => {
export const directivesPlugin = (): RspressPlugin => {
return {
name: 'doom-directives',
markdown: {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/global/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import fs from 'node:fs'
import path from 'node:path'

import { addTrailingSlash, type RspressPlugin } from '@rspress/core'
import { addTrailingSlash, type RspressPlugin } from '@rspress/shared'

import { ACP_BASE, type DoomSite } from '../../shared/index.js'
import type { ExportItem } from '../../types.js'
Expand Down
Loading