Code blocks
EventCatalog is powered by markdown files, this allows you to add custom code blocks.
EventCatalog is using expressive-code which provides a range of additional features for your code blocks.
Features include:
- Editor & Terminal Frames
- Text & Line Markers
- Adding labels to line markers - Great way to give context to your example code.
- Using diff-like syntax - Add diffs to your examples (e.g Schemas)
- Marking individual text inside lines
- Word wrapping
- And more...
Examples of code blocks
Diff code blocks
Highlight diffs with your code, could be useful for your Schemas or any changes you want to show to your teams.
See https://expressive-code.com/key-features/text-markers/#using-diff-like-syntax
Word highlighting
If you want to highlight words in your code blocks you can use this feature.
See https://expressive-code.com/key-features/text-markers/#marking-individual-text-inside-lines
Labels to line markers
Great way to give context to changes in your code. For example if your Schema has changed, then maybe use this to give context with additional labels.
See https://expressive-code.com/key-features/text-markers/#adding-labels-to-line-markers
Frames
Nice UI for your code blocks.