Skip to main content

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:

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.

Example Example

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.

Example Example

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.

Example

See https://expressive-code.com/key-features/text-markers/#adding-labels-to-line-markers

Frames​

Nice UI for your code blocks.

Example

See https://expressive-code.com/key-features/frames/