Skip to content

Latest commit

 

History

History
41 lines (26 loc) · 2.21 KB

File metadata and controls

41 lines (26 loc) · 2.21 KB

astro-portabletext


Examples

This directory provides concise code examples demonstrating specific techniques and features of the astro-portabletext library. These examples are designed to help you learn and adapt the code snippets for your own Astro projects.

See also: The package documentation.

Note: These are not full applications.

Available examples

Customizing Components

  • Block.astro — Shows how to extend and override the default rendering of specific block styles (node.style).
  • List.astro / ListItem.astro — Covers extending and overriding the default rendering of specific list items (node.listItem).
  • Mark.astro — Explains how to extend and override the rendering of specific mark types (node.markType).
  • Text.astrov0.11.0+ Illustrates handling the output of @text nodes in Portable Text.
  • Type.astro — Demonstrates handling custom Portable Text types (node._type) to render different components for each type, including a fallback for unknown types.

PortableText Component

Advanced Techniques

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.