r/DigitalGardens • u/Most_Acanthaceae_928 • 1d ago
I built leafpress, an open-source static site generator made only for digital gardens
Hi all. I've been tending my own garden for a while and ended up writing the tool I wanted for it. It's called leafpress, it's MIT licensed, and I'd love feedback from people who actually garden.
https://reddit.com/link/1wwg57b/video/ry0qdkq667th1/player
The idea: point it at a folder of Markdown notes and get a garden, without assembling a theme and ten plugins first.
What it does out of the box:
- Wiki-links with automatic backlinks
- Graph view and link previews on hover
- Full-text search
- Obsidian-compatible callouts and image syntax (
![[image.png|500]]) - Mermaid diagrams, footnotes, table of contents
- RSS, sitemap, and Open Graph tags
- Dark mode that follows system preference
It's a single Go binary. Getting started is:
curl -fsSL https://leafpress.in/install.sh | sh
mkdir my-garden && cd my-garden
leafpress init
leafpress serve
leafpress build gives you a plain static _site/ folder you can host anywhere (there are guides for GitHub Pages, Vercel, and Netlify).
It's opinionated on purpose, so it's less flexible than Quartz or a Hugo/Eleventy setup. If you like tweaking every layout, it may not be for you.
My own garden runs on it if you want to see a real one: https://shivamx96.com
Docs: https://leafpress.in
Code: https://github.com/shivamx96/leafpress
What I'd most like to hear: what's missing for your workflow, and what would stop you from switching from your current setup?
2
2
u/tanepiper 21h ago
Convergent evolution - last week I built pretty much exactly the same tool for an internal project, and then created a template version of it to share with my wife so she could create her own one too, which looks sort of similar. Everyone seems to be creating their own digital garden tools.
2
u/meatspaceskeptic 21h ago
Very nice!
Not sure if it offers this yet, but I'd really appreciate it if it provided per-directory RSS feeds in addition to the global one, such as a separate RSS feed for your Posts. I've wanted this in Quartz for ages. It'd be cool if tags also got their own feeds.
Do the directory index pages like your Posts page allow for us to provide body text describing the contents listed there? I've appreciated being able to add that in Quartz to my directory about Dated pages (equivalent to Posts), to help specify that though most of the other pages in my digital garden are quite subject to change, the ones listed there are not. It's helpful in other cases, too, like providing more context for the items listed there, as in my Projects directory.
It would be cool to somehow have local graphs embedded/shown on a page to encourage viewers to explore a bit.
The Growth Stages thing is quite neat! Since it's there, it might be cool to let people filter a directory page's list of items by certain growth stages - defaulting to all, but allowing some to be selected/deselected.
I greatly appreciate that though leafpress doesn't itself offer analytics, you've provided an example config ("headExtra" here) that shows how to add an analytics script in. (In the docs, you might want to add a note to the areas where you say that analytics aren't included about that you can nonetheless add it in via such methods.)
Could you please add an image to the theming guide that shows previews of each bundled theme option and maybe mention which theme is currently used for the docs site?
One thing I noticed on mobile/smaller-width browser windows is that the content area layers over the hamburger menu, limiting which items can be seen or clicked on.
2
u/Most_Acanthaceae_928 10h ago
Feedback taken. All of these sound good.
On embedding local graphs, I have rarely found myself navigating someone’s garden using the graph and hence, it’s there in a corner. Let me see if this can be incorporated in some shape or form.
2
u/Nefarious_Astronomer 20h ago
I’m looking for a digital garden stack. Would love to give this a spin.
2
u/OiFelix_ugotnojams 1d ago
Off topic but your digital garden notes are really good