docs-util: add support for workflows in markdown theme (#8485)

* add template for workflows

* initial changes

* added support for parallel steps

* added support for when

* added merge options

* fix merge options

* fix to tooltip

* clean up

* remove redirects

* fixes

* theme fixes + added merge options

* generate hook examples + fixes

* changed namespaces

* add custom autogenerator

* change type of additional data
This commit is contained in:
Shahed Nasser
2024-08-09 16:35:52 +03:00
committed by GitHub
parent 79b49c1288
commit a19c562bec
58 changed files with 2098 additions and 328 deletions
+12 -8
View File
@@ -3,6 +3,7 @@ import {
brokenLinkCheckerPlugin,
localLinksRehypePlugin,
typeListLinkFixerPlugin,
workflowDiagramLinkFixerPlugin,
} from "remark-rehype-plugins"
import { slugChanges } from "./generated/slug-changes.mjs"
import mdxPluginOptions from "./mdx-options.mjs"
@@ -15,6 +16,7 @@ const withMDX = mdx({
[brokenLinkCheckerPlugin],
[localLinksRehypePlugin],
[typeListLinkFixerPlugin],
[workflowDiagramLinkFixerPlugin],
],
remarkPlugins: mdxPluginOptions.options.remarkPlugins,
jsx: true,
@@ -29,14 +31,16 @@ const nextConfig = {
transpilePackages: ["docs-ui"],
basePath: process.env.NEXT_PUBLIC_BASE_PATH || "/v2/resources",
async redirects() {
// redirect original file paths to the rewrite
return slugChanges.map((item) => ({
source: item.origSlug,
destination: item.newSlug,
permanent: true,
}))
},
// Redirects shouldn't be necessary anymore since we have remark / rehype
// plugins that fix links. But leaving this here in case we need it again.
// async redirects() {
// // redirect original file paths to the rewrite
// return slugChanges.map((item) => ({
// source: item.origSlug,
// destination: item.newSlug,
// permanent: true,
// }))
// },
}
export default withMDX(nextConfig)