No version history yet. Start editing to create snapshots.
Leedoc
Write docs, ship scripts
Variables & Secrets
Override variables here. Changes auto-refresh the output.
Select or create a file...
Are you sure you want to delete:
This action cannot be undone.
Frontmatter Variables
Define variables in a comment block at the top of your file:
<!-- vars @HOSTNAME=example.com @SSH_PORT=22 SERVER_TYPE=production -->
@VAR_NAME— Runtime variable (shown in Variables panel, user-editable)VAR_NAME— Static variable (collapsed, for internal use)
Use {{VAR_NAME}} in your document to substitute values.
Embedding Components
Include reusable components from _components/:
<!-- embed: docker-install.md | {{INIT_SCRIPT}} -->
<!-- embed: almalinux-base-setup.md | init.sh -->
<!-- embed: almalinux-base-setup.md | init.sh,init2.sh,init3.sh -->
<!-- embed: readme-section.md -->
- With target (
| script.sh) — Component's tangle blocks output to specified script - With multiple targets (
| a.sh,b.sh,c.sh) — Same component tangle blocks output to each listed script - With variable target (
| {{VAR}}) — Target resolved from frontmatter - Without target — Component embedded for docs only (tangle markers stripped)
Script Extraction (Tangle)
Mark code blocks for extraction into scripts:
<!-- tangle: init.sh --> ```bash dnf install -y docker ```
Multiple blocks with the same filename are concatenated.
Collapsible Code Blocks
Collapse large code blocks in preview with an expand toggle:
<!-- collapse: backup-cron.sh | 10 --> ```bash #!/bin/bash # long script... ```
backup-cron.sh— Title shown in header (optional, click to copy)10— Lines visible when collapsed (optional, default: 15)
Stripped from exports. In DOCX, title renders as a bold header above the code block.
Table of Contents
Generate clickable navigation from headings:
[ld:toc] <!-- h2-h3 (default, skips h1 title) --> [ld:toc:4] <!-- h2-h4 --> [ld:toc:1-3] <!-- h1-h3 (include h1) --> [ld:toc:2-4] <!-- h2-h4 -->
Appears in preview only; stripped from exported markdown.
Numbered Headings
Auto-number sections with ## 0. syntax:
## 0. First Section → ## 1. First Section ## 0. Second Section → ## 2. Second Section ### 0. Subsection → ### 2.1. Subsection
Counters reset when a higher-level heading appears.
Keyboard Shortcuts
Component File Structure
Components use output.sh as a placeholder target:
## Install Docker <!-- tangle: output.sh --> ```bash dnf install -y docker ```
When embedded with a target, output.sh is replaced with the specified target.
No media files yet. Drag and drop images into the editor or use the Upload button.
Welcome to Leedoc
Write docs, ship scripts
Sign in to sync your projects across devices
Customize DOCX exports with Word templates. Download the default, modify styles in Word, and re-upload.
No custom templates yet. Upload a .docx file to get started.