Skip to content

Format code blocks during build for consistent styling #9057

@lforst

Description

@lforst

In the past, we had prettier in the repo which had the positive side effect that all (JS) code blocks in the docs had consistent formatting. Since we identified that prettier does not work well with current MDX we will lose this benefit.

However, It should be possible to format the code blocks during build, regardless of the input. With this I don't mean to actually modify commited code, but to sortof transpile the code blocks during the build, so that they are displayed formatted on the website.

We could apply different formatters for different languages and we may even use prettier for the JS code blocks.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions