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/clever-melons-talk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@alauda/doom": patch
---

fix: base is not included in pathname
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,26 +59,26 @@
},
"dependencies": {
"@cspell/eslint-plugin": "^8.19.4 || ^9.2.0",
"@eslint-react/eslint-plugin": "^1.52.4",
"@inquirer/prompts": "^7.8.2",
"@eslint-react/eslint-plugin": "^1.52.5",
"@inquirer/prompts": "^7.8.3",
"@openapi-contrib/openapi-schema-to-json-schema": "^5.1.0",
"@playwright/browser-chromium": "^1.54.2",
"@rsbuild/plugin-react": "^1.3.5",
"@rsbuild/plugin-sass": "^1.3.5",
"@rsbuild/plugin-svgr": "^1.2.2",
"@rsbuild/plugin-yaml": "^1.0.3",
"@rspress/core": "2.0.0-beta.26",
"@rspress/plugin-algolia": "2.0.0-beta.26",
"@rspress/plugin-llms": "2.0.0-beta.26",
"@rspress/shared": "2.0.0-beta.26",
"@rspress/core": "2.0.0-beta.27",
"@rspress/plugin-algolia": "2.0.0-beta.27",
"@rspress/plugin-llms": "2.0.0-beta.27",
"@rspress/shared": "2.0.0-beta.27",
"@shikijs/transformers": "^3.9.2",
"@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.9",
"es-toolkit": "^1.39.10",
"eslint": "^9.33.0",
"eslint-plugin-mdx": "^3.6.2",
"globals": "^16.3.0",
Expand Down Expand Up @@ -131,14 +131,14 @@
},
"devDependencies": {
"@changesets/changelog-github": "^0.5.1",
"@changesets/cli": "^2.29.5",
"@changesets/cli": "^2.29.6",
"@eslint/js": "^9.33.0",
"@swc-node/register": "^1.10.10",
"@swc-node/register": "^1.11.1",
"@swc/core": "1.13.3",
"@types/cli-progress": "^3.11.6",
"@types/ejs": "^3.1.5",
"@types/mdast": "^4.0.4",
"@types/node": "^22.17.1",
"@types/node": "^22.17.2",
"@types/picomatch": "^4.0.2",
"@types/pluralize": "^0.0.33",
"@types/react": "^19.1.10",
Expand Down
1 change: 0 additions & 1 deletion src/global/SiteOverrides/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ const concatTitle = (title: string, suffix?: string) => {
}

export const SiteOverrides = () => {
// eslint-disable-next-line @typescript-eslint/no-deprecated -- `usePage` is not exported...
const { siteData, page } = usePageData()
const {
pageType,
Expand Down
12 changes: 3 additions & 9 deletions src/global/VersionsNav/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import {
isProduction,
NoSSR,
usePageData,
withBase,
} from '@rspress/core/runtime'
import { isProduction, NoSSR, useSite, withBase } from '@rspress/core/runtime'
import { type NavItem } from '@rspress/shared'
import virtual from 'doom-@global-virtual'
import { noop } from 'es-toolkit'
Expand Down Expand Up @@ -45,14 +40,13 @@ if (!isProduction()) {
}

const VersionsNav_ = () => {
// eslint-disable-next-line @typescript-eslint/no-deprecated -- `usePage` is not exported...
const { siteData } = usePageData()
const { site } = useSite()

const lang = useLang()

const t = useTranslation()

const siteTitle = siteData.originalTitle ?? siteData.title
const siteTitle = site.originalTitle ?? site.title

const downloadLink = useMemo(() => {
if (!virtual.download) {
Expand Down
5 changes: 2 additions & 3 deletions src/runtime/components/ExternalSiteLink.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { NoSSR, useLang, usePageData } from '@rspress/core/runtime'
import { NoSSR, useLang, useSite } from '@rspress/core/runtime'
import {
addTrailingSlash,
isExternalUrl,
Expand Down Expand Up @@ -31,8 +31,7 @@ const ExternalSiteLink_ = ({
}: ExternalSiteLinkProps) => {
const isPrint = useIsPrint()

// eslint-disable-next-line @typescript-eslint/no-deprecated -- `usePage` is not exported...
const { siteData } = usePageData()
const { site: siteData } = useSite()

const site = useMemo(
() => virtual.sites?.find((s) => s.name === name),
Expand Down
5 changes: 2 additions & 3 deletions src/runtime/components/OpenAPIRef.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { usePageData } from '@rspress/core/runtime'
import { usePage } from '@rspress/core/runtime'
import openapisMap from 'doom-@api-openapisMap'
import type { OpenAPIV3_1 } from 'openapi-types'
import { type ReactNode, useId, useMemo } from 'react'
Expand Down Expand Up @@ -164,8 +164,7 @@ export const OpenAPIRef = ({
isCommonRef = true,
collectRefs = true,
}: OpenAPIRefProps) => {
// eslint-disable-next-line @typescript-eslint/no-deprecated -- `usePage` is not exported...
const { page } = usePageData()
const { page } = usePage()

let uid = useUid()

Expand Down
1 change: 0 additions & 1 deletion src/runtime/components/Overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ export function Overview(props: {
const {
siteData,
page: { routePath, frontmatter, title },
// eslint-disable-next-line @typescript-eslint/no-deprecated -- `usePage` is not exported...
} = usePageData()
const { content, groups: customGroups, defaultGroupTitle = 'Others' } = props

Expand Down
9 changes: 4 additions & 5 deletions src/theme.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useLang, usePageData, withBase } from '@rspress/core/runtime'
import { useLang, useSite, withBase } from '@rspress/core/runtime'
import {
Search as OriginalSearch,
Layout as OriginalLayout,
Expand Down Expand Up @@ -65,7 +65,7 @@ const getClosestSidebar_ = (
}
}

const sidebarLink = cleanupUrlPath(withBase(sidebar.link))
const sidebarLink = cleanupUrlPath(sidebar.link || '')
if (sidebarLink === pathname) {
return matched
}
Expand Down Expand Up @@ -102,9 +102,8 @@ const getClosestSidebar = (sidebarItems: DoomSidebar[], pathname: string) => {
// eslint-disable-next-line import-x/export
export const Layout = () => {
const {
siteData: { lang: siteLang, themeConfig },
// eslint-disable-next-line @typescript-eslint/no-deprecated -- `usePage` is not exported...
} = usePageData()
site: { lang: siteLang, themeConfig },
} = useSite()

const lang = useLang()

Expand Down
Loading