Skip to content

Idea: use MDX code block attributes #574

@honzajavorek

Description

@honzajavorek

It would be actually cool if we could use MDX code block properties, e.g. like

Let's start with
```python group=example1.py
from pprint import pp
```
and then continue with
```python group=example1.py
pp({"hello": "world")
```

In my mind, that would be very idiomatic to how Docusaurus code blocks work and it would gave us explicit control which code examples get grouped.

Still, this is just a slightly different way of what doccmd is already doing, and wouldn't take away the manual work denoting which code blocks should be put together before linted. It's a fuzzy thing and in some pages requires manual restructuring of the examples so they could be grouped and linted (or tested, etc.).


This is a copy paste from apify/apify-docs#2027 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions