Skip to content

Latest commit

 

History

540 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

astro-portabletext

npm version npm downloads license

A flexible library for rendering Portable Text content in Astro projects.

Prerequisites:

  • Astro (>=4.6.0)
  • Node.js (>=22.12.0)

Installation:

npm install astro-portabletext

Features

  • Core components for common rich text elements.
  • Custom rendering using slots or your own components.
  • Flexible control with the render function via usePortableText.
  • Built with TypeScript support.

Demonstration

View live examples:

Open in StackBlitz Open in CodeSandbox

Resources

Sanity

Sanity has forked astro-portabletext as @portabletext/astro, which is maintained under the @portabletext organization.

Continue with astro-portabletext

If you're already using astro-portabletext, you can continue using it as-is. There is no requirement to migrate.

Migrate to @portabletext/astro

If you would prefer to use the Sanity-maintained fork, see their migration guide for instructions.

Additional Sanity + Astro resources

Contributing

We welcome contributions to improve astro-portabletext!

If you find a bug or have a feature request, please open an issue. If you'd like to contribute code, feel free to submit a pull request.

License

ISC

About

A flexible library for rendering Portable Text content in Astro projects.

Topics

Resources

Stars

106 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages