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)
Linking Between Pages
Rule of thumb:
- Internal links (to other pages in this project) — use
[[wikilinks]]. They always resolve correctly and are the safest form. - External links (http, mailto, etc.) — use standard markdown
[label](url). They're passed through as normal browser links.
Wikilinks (recommended for internal — easier to type, no extension needed):
[[install]] <!-- link text = "install" --> [[install|Install Guide]] <!-- custom label after the pipe --> [[setup/install]] <!-- target a file in a subfolder --> [[setup/install|Install Guide]] <!-- subfolder + custom label --> [[install#section-id]] <!-- jump to a heading -->
Standard markdown links (also work internally, and stay portable in exports):
[Install Guide](install.md) <!-- explicit .md extension --> [Install Guide](setup/install.md) <!-- subfolder --> [Home](../README.md) <!-- parent folder --> [Setup, step 3](setup/install.md#step-3) [Install Guide](setup/install) <!-- bare name also works if the page exists --> [Anthropic](https://anthropic.com) <!-- external — left as a normal link -->
- With
.mdextension: always treated as an internal link. If the target doesn't exist, it shows as a red broken link — clicking opens the New File dialog pre-filled to create the page. - Without an extension: Leedoc tries to resolve it against project pages. If a page matches, it becomes an internal link; otherwise it's left alone (treated as a regular URL/path).
- Wikilinks are expanded into relative markdown links during weave, so the exported
.mdfiles stay portable to GitHub, Obsidian, pandoc, etc.
Don't mix the two syntaxes. [[Title here]](link) is invalid — use either:
[[link|Title here]] <!-- wikilink with label --> [Title here](link.md) <!-- standard markdown -->
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.