Use @tanstack/markdown for the tutorial's markdown content #100008
Send to my agentOpen
fuko opened this issue ·0 comments
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) andsrc/data/deep-dives/query-driven-sync.mdx. - It is compiled at build time by
@mdx-js/rollupinvite.config.ts, with@shikijs/rehypefor syntax highlighting (themesmaterial-theme-lighter/material-theme-darker,transformerMetaHighlight, and a custom transformer that addsdata-languageto<pre>). @mdx-js/reactis a dependency, andsrc/declarations.d.tsdeclares the*.mdxmodule type.src/data/tutorial.tsimports the.mdxfiles as components.
To do#
- Add
@tanstack/markdownand 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-languageattribute 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/reactand@shikijs/rehypeif they are no longer needed, and the*.mdxdeclaration,.prettierignoreandknip.jsonentries. - 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.