Skip to content

Instantly share code, notes, and snippets.

View robotii's full-sized avatar

Peter Arthur robotii

View GitHub Profile
@robotii
robotii / obsidian-pagebreaks.css
Last active June 19, 2025 14:25
Obsidian Pagebreaks
/*
Create pagebreaks in exported Obsidian PDFs.
Rules:
- Convert ALL hr to page breaks.
- Page break before h1 and h2, except for the h1 on the first page.
This should now work correctly
- Don't break immediately after a heading.
- Don't break in the middle of preformatted text or blockquotes.
- Avoid splitting up h1 immediately followed by h2 etc.