docs: add tags package to generate tags (#10666)
* initial changes * finalize implementation * run generator on prep * remove tags package from book * optimization attempt * test transpile * test transpile * rename utils * rename directory * add vercel ignore * add tags to book
This commit is contained in:
1 parent
3f4d574748
commit
16ae192456
41 files changed
+424
-62
No files matched your search
@@ -0,0 +1 @@
|
||||
../../utils
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
typeListLinkFixerPlugin,
|
||||
workflowDiagramLinkFixerPlugin,
|
||||
} from "remark-rehype-plugins"
|
||||
import bundleAnalyzer from "@next/bundle-analyzer"
|
||||
import mdxPluginOptions from "./mdx-options.mjs"
|
||||
import path from "node:path"
|
||||
|
||||
@@ -137,4 +138,8 @@ const nextConfig = {
|
||||
// },
|
||||
}
|
||||
|
||||
export default withMDX(nextConfig)
|
||||
const withBundleAnalyzer = bundleAnalyzer({
|
||||
enabled: process.env.ANALYZE === "true",
|
||||
})
|
||||
|
||||
export default withMDX(withBundleAnalyzer(nextConfig))
|
||||
@@ -27,17 +27,20 @@
|
||||
"remark-frontmatter": "^5.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@next/bundle-analyzer": "^15.1.1",
|
||||
"@types/mdx": "^2.0.13",
|
||||
"@types/node": "^20",
|
||||
"@types/react": "npm:types-react@rc",
|
||||
"@types/react-dom": "npm:types-react@rc",
|
||||
"autoprefixer": "^10.0.1",
|
||||
"build-scripts": "*",
|
||||
"docs-utils": "*",
|
||||
"eslint": "^9.13.0",
|
||||
"eslint-plugin-prettier": "^5.2.1",
|
||||
"eslint-plugin-react-hooks": "^5.0.0",
|
||||
"postcss": "^8",
|
||||
"remark-rehype-plugins": "*",
|
||||
"tags": "*",
|
||||
"tailwind": "*",
|
||||
"tailwindcss": "^3.3.0",
|
||||
"ts-node": "^10.9.2",
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
import { generateEditedDates, generateSidebar } from "build-scripts"
|
||||
import { generateTags } from "tags"
|
||||
import { main as generateSlugChanges } from "./generate-slug-changes.mjs"
|
||||
import { main as generateFilesMap } from "./generate-files-map.mjs"
|
||||
import { sidebar } from "../sidebar.mjs"
|
||||
import path from "path"
|
||||
|
||||
async function main() {
|
||||
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 { getFileSlugUtil } from "remark-rehype-plugins"
|
||||
import { getFileSlug } from "../../../packages/docs-utils/dist"
|
||||
|
||||
const monoRepoPath = path.resolve("..", "..", "..")
|
||||
|
||||
@@ -42,7 +42,7 @@ export default async function getSlugs(options = {}) {
|
||||
continue
|
||||
}
|
||||
|
||||
const newSlug = await getFileSlugUtil(filePath)
|
||||
const newSlug = await getFileSlug(filePath)
|
||||
|
||||
if (newSlug) {
|
||||
slugs.push({
|
||||
|
||||
Reference in new issue
Block a user