docusaurus插件开发
Some checks failed
Release / deploy (push) Failing after 1m42s

This commit is contained in:
2024-03-24 18:34:18 +08:00
parent ac55a0c6a2
commit e9c32c4118
9 changed files with 340 additions and 47 deletions

View File

@ -9,12 +9,11 @@ export default function HeadingWrapper(props) {
const syntheticTitle = useSyntheticTitle();
const doc = useDoc();
const detail = (doc.metadata as any).detail as Detail;
return (
<>
<Heading {...props}>
{props.children}
{detail && !syntheticTitle && (
{detail && !syntheticTitle && props.as.toString() === "h1" && doc.contentTitle==props.children && (
<span
style={{
display: "block",

View File

@ -6,9 +6,10 @@ export default function AntdProvider({ children }) {
return (
<ConfigProvider
theme={{
algorithm: colorMode.isDarkTheme
? theme.darkAlgorithm
: theme.defaultAlgorithm,
algorithm:
colorMode.colorMode == "dark"
? theme.darkAlgorithm
: theme.defaultAlgorithm,
}}
>
{children}