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:
Shahed Nasser
2025-05-30 16:55:36 +03:00
committed by GitHub
parent 490bd7647f
commit 009d00f27d
293 changed files with 1975 additions and 506 deletions
@@ -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>
)
}