Widgets: terminal & code
Two of the most common card embellishments: a styled terminal window for command-line snippets, and fenced code blocks with syntax highlighting.
Terminal widget
Wrap commands in a <terminal> tag for a macOS-style window with traffic-light dots and a title bar.
<terminal title="My Terminal">
git init
git add .
</terminal>
The title attribute defaults to terminal if omitted.
Code highlighting
Use fenced code blocks with a language hint for syntax highlighting.
```python
def hello():
print("Hello!")
return 42
```
Supported languages include Python, JavaScript, HTML, CSS, Bash, JSON, and many more — anything in the highlight.js common bundle will work.
Code blocks adapt to dark mode automatically: light theme uses GitHub, dark mode uses Atom One Dark.