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

fix: remove invalid `frontmatter.title`, bump rspress to v2.0.0-beta.11
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,22 @@
},
"dependencies": {
"@cspell/eslint-plugin": "^8.19.4 || ^9.0.2",
"@eslint-react/eslint-plugin": "^1.51.0",
"@eslint-react/eslint-plugin": "^1.51.1",
"@inquirer/prompts": "^7.5.3",
"@openapi-contrib/openapi-schema-to-json-schema": "^5.1.0",
"@playwright/browser-chromium": "^1.52.0",
"@rsbuild/plugin-sass": "^1.3.2",
"@rsbuild/plugin-yaml": "^1.0.2",
"@rspress/core": "2.0.0-beta.10",
"@rspress/plugin-algolia": "2.0.0-beta.10",
"@rspress/plugin-llms": "^2.0.0-beta.10",
"@shikijs/transformers": "^3.5.0",
"@rspress/core": "2.0.0-beta.11",
"@rspress/plugin-algolia": "2.0.0-beta.11",
"@rspress/plugin-llms": "^2.0.0-beta.11",
"@shikijs/transformers": "^3.6.0",
"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.0",
"es-toolkit": "^1.39.1",
"eslint": "^9.28.0",
"eslint-plugin-mdx": "^3.4.2",
"html-tag-names": "^2.1.0",
Expand All @@ -94,7 +94,7 @@
"remark-mdx": "^3.1.0",
"remark-stringify": "^11.0.0",
"shiki": "^3.6.0",
"simple-git": "^3.27.0",
"simple-git": "^3.28.0",
"swagger2openapi": "^7.0.8",
"tinyglobby": "^0.2.14",
"type-fest": "^4.41.0",
Expand Down
10 changes: 10 additions & 0 deletions patches/@rspress+theme-default+2.0.0-beta.11.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
diff --git a/node_modules/@rspress/theme-default/dist/index.d.ts b/node_modules/@rspress/theme-default/dist/index.d.ts
index 770226b..f8c4be3 100644
--- a/node_modules/@rspress/theme-default/dist/index.d.ts
+++ b/node_modules/@rspress/theme-default/dist/index.d.ts
@@ -566,4 +566,4 @@ export declare function useSidebarData(): SidebarData;
*/
export declare const useThemeState: () => readonly [ThemeValue, (value: ThemeValue, storeValue?: ThemeConfigValue) => void];

-export { }
+export declare function renderInlineMarkdown(text: string): { children: string | null } | { dangerouslySetInnerHTML: { __html: string } }
4 changes: 4 additions & 0 deletions src/cli/translate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,10 @@ export const translateCommand = new Command('translate')
newFrontmatter.title = sourceFrontmatter.i18n.title[target]
}

if (typeof newFrontmatter.title !== 'string') {
delete newFrontmatter.title
}

targetContent = matter.stringify(
content.startsWith('\n') ? content : '\n' + content,
newFrontmatter,
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/components/ExternalSiteLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const ExternalSiteLink_ = ({
}
target="_blank"
rel="noopener noreferrer"
className={clsx(classes.link, 'cursor-pointer', className)}
className={clsx(classes.link, 'rp-cursor-pointer', className)}
{...props}
/>
)
Expand Down
17 changes: 8 additions & 9 deletions src/runtime/components/K8sCrd.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,23 +131,22 @@ export const K8sCrdSchema = ({
return (
<>
<Markdown>{description}</Markdown>
<div className="flex items-center">
<div className="rp-flex rp-items-center">
<span>
<code>{version}</code> <Badge>version</Badge>
</span>
{!isPrint && properties != null && (
<Button
className="ml-auto doom-btn"
className="rp-ml-auto doom-btn"
type="button"
text={
<span onClick={toggleExpandAll}>
{expandAll ? '-' : '+'}{' '}
{t(expandAll ? 'collapse_all' : 'expand_all')}
</span>
}
size="medium"
theme="alt"
></Button>
>
<span onClick={toggleExpandAll}>
{expandAll ? '-' : '+'}{' '}
{t(expandAll ? 'collapse_all' : 'expand_all')}
</span>
</Button>
)}
</div>
{properties == null ? (
Expand Down
24 changes: 13 additions & 11 deletions src/runtime/components/Overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,40 +203,42 @@ export function Overview(props: {
const groups = customGroups ?? defaultGroups

return (
<div className="overview-index doom-overview-index mx-auto">
<div className="overview-index doom-overview-index rp-mx-auto">
{content}
{groups.map((group) => (
<Fragment key={group.name}>
{/* If there is no sidebar group, we show the sidebar items directly and hide the group name */}
{(!title || [title, defaultGroupTitle].includes(group.name)) &&
groups.length === 1 ? (
<h2 style={{ paddingTop: 0 }}></h2>
<h2 style={{ paddingTop: 0 }} />
) : (
<h2>{renderInlineMarkdown(group.name)}</h2>
<h2 {...renderInlineMarkdown(group.name)} />
)}

<div className={classes.overviewGroups}>
{group.items.map((item) => (
<div className={classes.overviewGroup} key={item.link}>
<h3 style={{ marginBottom: 8 }}>
<Link href={normalizeHref(item.link)}>
{renderInlineMarkdown(item.text)}
</Link>
<Link
href={normalizeHref(item.link)}
{...renderInlineMarkdown(item.text)}
/>
</h3>
<div className={classes.overviewDescription}>
{item.description}
</div>
<ul className="list-none">
<ul className="rp-list-none">
{item.headers?.map((header) => (
<li
key={header.id}
className={`${classes.overviewGroupLi} ${
classes[`level${header.depth}`]
} first:mt-2`}
} first:rp-mt-2`}
>
<Link href={`${normalizeHref(item.link)}#${header.id}`}>
{renderInlineMarkdown(header.text)}
</Link>
<Link
href={`${normalizeHref(item.link)}#${header.id}`}
{...renderInlineMarkdown(header.text)}
/>
</li>
))}
</ul>
Expand Down
Loading