docs: support generating sidebar items with tags (#10672)
* docs: support generating sidebar items with tags * small fix * fix dependencies * test * test fix * test fix * test fix * test fix * another fix * revert change * fix for resources
This commit is contained in:
@@ -0,0 +1 @@
|
||||
../../utils
|
||||
@@ -167,6 +167,12 @@ const nextConfig = {
|
||||
}
|
||||
},
|
||||
redirects,
|
||||
experimental: {
|
||||
outputFileTracingExcludes: {
|
||||
"*": ["node_modules/@medusajs/icons"],
|
||||
},
|
||||
},
|
||||
optimizePackageImports: ["@medusajs/icons", "@medusajs/ui"],
|
||||
}
|
||||
|
||||
export default withMDX(nextConfig)
|
||||
|
||||
@@ -126,16 +126,12 @@ const nextConfig = {
|
||||
},
|
||||
]
|
||||
},
|
||||
// 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,
|
||||
// }))
|
||||
// },
|
||||
experimental: {
|
||||
outputFileTracingExcludes: {
|
||||
"*": ["node_modules/@medusajs/icons"],
|
||||
},
|
||||
},
|
||||
optimizePackageImports: ["@medusajs/icons", "@medusajs/ui"],
|
||||
}
|
||||
|
||||
const withBundleAnalyzer = bundleAnalyzer({
|
||||
|
||||
@@ -6,11 +6,11 @@ import { sidebar } from "../sidebar.mjs"
|
||||
import path from "path"
|
||||
|
||||
async function main() {
|
||||
await generateTags(path.resolve("..", "..", "packages", "tags"))
|
||||
await generateSidebar(sidebar)
|
||||
await generateSlugChanges()
|
||||
await generateFilesMap()
|
||||
await generateEditedDates()
|
||||
await generateTags(path.resolve("..", "..", "packages", "tags"))
|
||||
}
|
||||
|
||||
void main()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { statSync, readdirSync } from "fs"
|
||||
import path from "path"
|
||||
import { getFileSlug } from "../../../packages/docs-utils/dist"
|
||||
import { getFileSlug } from "docs-utils"
|
||||
|
||||
const monoRepoPath = path.resolve("..", "..", "..")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user