You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+57Lines changed: 57 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -545,6 +545,63 @@ For most setups, prefer `--public-access` for read-only public access and the vi
545
545
546
546
---
547
547
548
+
## .leafwikiignore — Ignore Files
549
+
550
+
LeafWiki indexes every `.md` file it finds on disk. If you have files or directories you want to keep on disk but exclude from the wiki (draft pages, archive sections, private notes, imported markdown being organized), create a `.leafwikiignore` file at the root of your wiki's data directory.
551
+
552
+
**Location:** Anywhere under `root/`. A `.leafwikiignore` at the wiki root applies to the entire wiki; per-directory files apply to their directory and its children.
553
+
554
+
**Syntax:** Standard gitignore-style patterns:
555
+
556
+
| Pattern | Meaning |
557
+
|---------|---------|
558
+
| `#` | Comment |
559
+
| `*` | Matches anything except `/` |
560
+
| `?` | Matches any single char except `/` |
561
+
| `**` | Matches zero or more directories |
562
+
| Trailing `/` | Directory-only match |
563
+
| Leading `/` | Anchored to wiki root |
564
+
| `!` prefix | Negation (un-ignore) |
565
+
566
+
**Examples:**
567
+
568
+
```gitignore
569
+
# Exclude all log files
570
+
*.log
571
+
572
+
# Exclude entire directory
573
+
drafts/
574
+
575
+
# Exclude everything except important.md
576
+
*.md
577
+
!important.md
578
+
```
579
+
580
+
**Notes:**
581
+
- Changes to any `.leafwikiignore` require a restart to take effect.
582
+
- Ignored files are hidden completely — remove the ignore pattern to see them again.
583
+
- Per-directory ignore files are supported: any directory under `root/` may contain its own `.leafwikiignore`. Patterns accumulate from root to leaf, and child patterns can negate parent patterns with `!`.
584
+
585
+
**Multi-level example:**
586
+
587
+
```gitignore
588
+
# root/.leafwikiignore — applies everywhere
589
+
*.md
590
+
591
+
# root/docs/.leafwikiignore — un-ignore specific files under docs/
592
+
!important.md
593
+
594
+
# root/docs/archive/.leafwikiignore — re-ignore files under archive/
595
+
*.md
596
+
```
597
+
598
+
In this example:
599
+
- All `.md` files are ignored by default (root rule).
- `docs/archive/`is re-ignored (grandchild re-applies the restriction).
602
+
603
+
---
604
+
548
605
## Sorting Pages
549
606
550
607
Page order in LeafWiki is **explicit and manual** — it does not follow filename or alphabetical order automatically. By default, pages appear in the order they were created.
0 commit comments