Documentation
README
Portable Text Conversion
Convert external content (HTML, Markdown) into Portable Text for Sanity. Three main approaches:
markdownToPortableTextโ Convert Markdown directly using@portabletext/markdown(recommended for Markdown)htmlToBlocksโ Parse HTML into PT blocks using@portabletext/block-tools(for HTML migration)- Manual construction โ Build PT blocks directly from any source (APIs, databases, etc.)
Portable Text Specification
Understand the target format before converting. PT is an array of blocks:
This is the opening of the README. Read the full README on GitHub.