Custom Components
You can add you own components as an embed, similar to the text and code components.
This flexibility is one of the key reasons to use TinaCMS and this package.
The Technical Side of Component Rendering
All content written in the body of your documentation is stored as the rich-text data-type.
This data-type is broken down into a hierarchical abstract syntax tree (AST).
This data can be parsed into a <TinaMarkdown>
object to populate it with data:
After this, the MarkdownComponentMapping
is used to parse each object from the AST data into their corresponding React components based on node type, allowing you to override default rendering behaviour for elements like headings, links, code blocks, and more.