Trees (Project Structure)¶
Display a directory tree / project structure in a clean "file explorer" card. Void gives tree code blocks a glassy, monospace treatment with subtly dimmed comments.
Basic usage¶
Wrap the tree in a tree fenced code block:
mkdocs-void/
βββ void/ # Python package
β βββ __init__.py # Version (0.2.0)
β βββ templates/
β β βββ base.html
β β βββ main.html
β β βββ partials/
β β βββ header.html
β β βββ toc.html
β βββ plugins/
β βββ void_plugin.py # MkDocs plugin
βββ docs/
β βββ index.md
β βββ components/
βββ mkdocs.yml
βββ requirements.txt
```tree
mkdocs-void/
βββ void/ # Python package
β βββ __init__.py # Version (0.2.0)
...
```
Features¶
- Box-drawing support β
βββ,βββ,βglyphs render crisply in a monospace font. - Dimmed comments β trailing
# commentsare shown in muted italic so they don't fight the tree lines. - File-explorer card β each tree is wrapped in a subtle glass panel with rounded corners.
- Scrollable β long trees scroll horizontally instead of wrapping.
Aligning comments¶
Pipe characters and spaces keep columns aligned. Use a monospace source editor; Void renders 1:1 with white-space: pre.
src/
βββ core/
β βββ engine.py # entry point
β βββ parser.py # tokenizer
βββ ui/
βββ app.js # main view
βββ styles.js # tokens
Customizing¶
Override the card background/border by targeting the tree block in a custom stylesheet:
/* extra.css */
.highlight.language-tree {
background: rgba(255, 255, 0, 0.04);
border-color: var(--void-accent);
}
Trees pair well with the Code Highlighting and Admonitions components. See CSS Classes in Markdown to attach your own classes.