Steps to index site
- generate sitemap
- add sitemap to typesense config.json
add MDX unifiedjs.vscode-mdx to fix linting for MDX
Seems docusaurus@next still relies on Webpack/Babel which scales horrendously with large sites.
Docusaurus SSG transforms MD to React FC
Fortunately, there seems to be a way to mod the JS loader with esbuild instead of webpack:
<span>
{children?.length //! this is some epic ternary spaghetti!
? minIcon
? collapse
? "🔽"
: "🔼"
: null
: minIcon && "⏩"}
</span>
This code snippet does not work:
import { map_all_parents } from "../src/data/index.ts"
console.dir(map_all_parents)
This page crashed. "useColorMode()" is used outside of "Layout" component. Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.

https://www.google.com/search?q=Hook+is+called+outside+the+%3CColorModeProvider%3E%22
@docusaurus/theme-common missingwas not installed and included in dependencies within package.json
FIX: add to package.json & reinstall deps
FIX: npm i --force-legacy-deps BUT keep using react v18
https://github.com/facebook/docusaurus/issues/6724#issuecomment-1280912963
Working Playground IDE example
Don't use pnpm - it's buggy and the disk space savings aren't worth it!! Painful bugs like this aren't worth it...
TODO: Compare react-live live IDE vs my own @rjnote version later on.