Skip to content
Source
Sign inSign up
fuko/trytanstackdb.com

Use @tanstack/markdown for the tutorial's markdown content #100008

Send to my agent
Openfuko opened this issue 0 comments
fukocommented

Render the tutorial and deep-dive content with @tanstack/markdown, replacing the current MDX setup.

Current setup

  • The content is MDX: src/data/tutorial/*.mdx (collections-intro, how-do-collections-work, optimistic-updates, what-is-next) and src/data/deep-dives/query-driven-sync.mdx.
  • It is compiled at build time by @mdx-js/rollup in vite.config.ts, with @shikijs/rehype for syntax highlighting (themes material-theme-lighter / material-theme-darker, transformerMetaHighlight, and a custom transformer that adds data-language to <pre>).
  • @mdx-js/react is a dependency, and src/declarations.d.ts declares the *.mdx module type. src/data/tutorial.ts imports the .mdx files as components.

To do

  • Add @tanstack/markdown and render the tutorial and deep-dive content with it.
  • Keep the current code highlighting: both themes, line highlighting from code-block meta, and the data-language attribute that the styles use.
  • Check which MDX features (JSX components, imports) the content uses, and how to keep them or replace them.
  • Remove @mdx-js/rollup, @mdx-js/react and @shikijs/rehype if they are no longer needed, and the *.mdx declaration, .prettierignore and knip.json entries.
  • Check that every tutorial step and the deep dive look the same as before, in light and dark mode.

Sign in to join this conversation.