fossunited / monschool-website

Repository of all courses on mon.school
24 stars 10 forks source link

Add support for multiple files in code examples #49

Closed anandology closed 2 years ago

anandology commented 2 years ago

The current example interface allows only one file and does't show the the filename. For #27, we need multiple files one for code and one or more for templates. It would be good to find a way to specify multiple files as part of example.

Proposal

```{.python .example}
=== app.py lang=python
print("hello, world!")
=== templates/index.html lang=html
<h1>Hello, {{name}}</h1>
```

That would show multiple files in the code editor as tabs and automatically switch between the language modes.