docs: redesign table of content (#12647)
* implement toc * added to projects * fixes and adapt for references * added product frontmatter * remove action menu from 404 pages
This commit is contained in:
@@ -8,12 +8,14 @@ import {
|
||||
localLinksRehypePlugin,
|
||||
workflowDiagramLinkFixerPlugin,
|
||||
prerequisitesLinkFixerPlugin,
|
||||
recmaInjectMdxDataPlugin,
|
||||
} from "remark-rehype-plugins"
|
||||
import MDXComponents from "@/components/MDXComponents"
|
||||
import mdxOptions from "../../../mdx-options.mjs"
|
||||
import { filesMap } from "../../../generated/files-map.mjs"
|
||||
import { Metadata } from "next"
|
||||
import { cache } from "react"
|
||||
import { cache, Suspense } from "react"
|
||||
import { Loading } from "docs-ui"
|
||||
|
||||
type PageProps = {
|
||||
params: Promise<{
|
||||
@@ -37,40 +39,50 @@ export default async function ReferencesPage(props: PageProps) {
|
||||
}
|
||||
|
||||
return (
|
||||
<MDXRemote
|
||||
source={fileData.content}
|
||||
components={MDXComponents}
|
||||
options={{
|
||||
mdxOptions: {
|
||||
rehypePlugins: [
|
||||
...mdxOptions.options.rehypePlugins,
|
||||
[
|
||||
typeListLinkFixerPlugin,
|
||||
{
|
||||
...pluginOptions,
|
||||
checkLinksType: "md",
|
||||
},
|
||||
],
|
||||
[
|
||||
workflowDiagramLinkFixerPlugin,
|
||||
{
|
||||
...pluginOptions,
|
||||
checkLinksType: "value",
|
||||
},
|
||||
],
|
||||
[
|
||||
prerequisitesLinkFixerPlugin,
|
||||
{
|
||||
...pluginOptions,
|
||||
checkLinksType: "value",
|
||||
},
|
||||
],
|
||||
[localLinksRehypePlugin, pluginOptions],
|
||||
],
|
||||
remarkPlugins: mdxOptions.options.remarkPlugins,
|
||||
},
|
||||
}}
|
||||
/>
|
||||
<Suspense fallback={<Loading />}>
|
||||
<div className="animate animate-fadeIn">
|
||||
<MDXRemote
|
||||
source={fileData.content}
|
||||
components={MDXComponents}
|
||||
options={{
|
||||
mdxOptions: {
|
||||
rehypePlugins: [
|
||||
...mdxOptions.options.rehypePlugins,
|
||||
[
|
||||
typeListLinkFixerPlugin,
|
||||
{
|
||||
...pluginOptions,
|
||||
checkLinksType: "md",
|
||||
},
|
||||
],
|
||||
[
|
||||
workflowDiagramLinkFixerPlugin,
|
||||
{
|
||||
...pluginOptions,
|
||||
checkLinksType: "value",
|
||||
},
|
||||
],
|
||||
[
|
||||
prerequisitesLinkFixerPlugin,
|
||||
{
|
||||
...pluginOptions,
|
||||
checkLinksType: "value",
|
||||
},
|
||||
],
|
||||
[localLinksRehypePlugin, pluginOptions],
|
||||
],
|
||||
remarkPlugins: [...mdxOptions.options.remarkPlugins],
|
||||
recmaPlugins: [
|
||||
[
|
||||
recmaInjectMdxDataPlugin,
|
||||
{ isRemoteMdx: true, mode: process.env.NODE_ENV },
|
||||
],
|
||||
],
|
||||
},
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</Suspense>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user