Skip to main content

Obsidian-compatible static site generator

Project description

rockgarden

A Python static site generator that works with Obsidian vaults and plain markdown folders out of the box. Point it at a directory of markdown files and get a navigable HTML site — no config required.

Rockgarden handles Obsidian-specific syntax (wiki-links, embeds, callouts) so you can publish your vault without changing how you write. For plain markdown, it just works.

Philosophy

Progressive customization. Start with zero config and add complexity only when you need it:

  • Zero config — Point at a folder, get a site
  • Convention — Drop CSS in _styles/, templates in _templates/
  • Configuration — Define collections, navigation, themes in rockgarden.toml
  • Full control — Custom templates, build hooks, data pipelines

The goal is to scale from a personal wiki to a full-featured site without switching tools.

Installation

pip install rockgarden

Or with uv:

uv tool install rockgarden

Quick Start

rockgarden build     # build your site
rockgarden serve     # preview locally

Features

Obsidian support:

  • Wiki-links ([[page]], [[page|text]], [[page#section]])
  • Note transclusions (![[note]])
  • Media embeds (images, audio, video, PDF)
  • Callouts (all Obsidian callout types)

Navigation & discovery:

  • Auto-generated sidebar, breadcrumbs, folder index pages
  • Per-page table of contents
  • Backlinks
  • Client-side full-text search
  • Tag display and tag index pages (/tags/<tag>/)
  • Sitemap generation
  • Broken link detection with visual indication

Customization:

  • Built-in theme with dark/light mode
  • Template overrides via _templates/
  • Layout system with named Jinja2 blocks
  • Custom CSS (_styles/) and JS (_scripts/) auto-injected
  • Theme export for full customization (rockgarden theme export)

Collections:

  • Named content subsets scoped by directory
  • Load data from YAML, JSON, and TOML files
  • Pydantic model validation via _models/
  • Per-collection templates, URL patterns, and page generation
  • Collection entries available in all templates

Build pipeline:

  • Build hooks (pre_build, post_collect, post_build)
  • Content exported to .rockgarden/content.json for hook scripts
  • Base path prefix for subdirectory deploys
  • SEO meta tags from frontmatter (description, Open Graph)

Other:

  • Clean URLs (/page/ instead of /page.html)
  • Accessibility (skip links, ARIA landmarks, focus styles)
  • Zero lock-in — your content stays as plain markdown files

CLI Commands

rockgarden build           # build your site
rockgarden serve           # local dev server
rockgarden init            # initialize a new project
rockgarden theme export    # export theme for customization
rockgarden icons update    # download Lucide icons for local override

Configuration

Optional. Create rockgarden.toml to customize:

[site]
title = "My Site"
source = "content"
output = "_site"

[build]
ignore_patterns = [".obsidian", "Templates"]

[nav]
sort = "files-first"

[theme]
name = "default"

[[collections]]
name = "speakers"
source = "speakers"
template = "speaker.html"
url_pattern = "/speakers/{slug}/"

[hooks]
post_build = ["echo 'Build complete'"]

Development

Requires just and uv.

just install   # install dependencies
just test      # run tests
just check     # lint and format check
just format    # auto-fix lint and formatting
just ci        # lint + tests (run before submitting)
just build     # build the demo site
just serve     # serve output directory
just css       # compile Tailwind CSS

Requirements

Python 3.13+

Acknowledgements

Rockgarden was inspired by Quartz, a static site generator for Obsidian vaults. Check it out as it might be more appropriate for your use case. When I found myself increasingly customizing my installation I decided to start building my own implementation, with the features I always wanted in a static site generator.

Contributing

Contributions may be welcome if they fit the vision of this project. Please open an issue before submitting PRs. See CONTRIBUTING.md for details.

License

MIT. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rockgarden-0.6.0.tar.gz (603.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rockgarden-0.6.0-py3-none-any.whl (523.2 kB view details)

Uploaded Python 3

File details

Details for the file rockgarden-0.6.0.tar.gz.

File metadata

  • Download URL: rockgarden-0.6.0.tar.gz
  • Upload date:
  • Size: 603.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for rockgarden-0.6.0.tar.gz
Algorithm Hash digest
SHA256 030c9655be7d6e8e8690d39df5baaf222aad5c6052d1b91f7f949d34c55c6bd6
MD5 05544e8b9b7340d40b23725b0d9fc400
BLAKE2b-256 755c8e126895101c01a4fe3e976e2f64c14a79e5bc03ffbe96717b0bf2f1dfce

See more details on using hashes here.

File details

Details for the file rockgarden-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: rockgarden-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 523.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for rockgarden-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 59e9d43b923f2ef2a70b75b6d887573cd3b35fd78753f6c45e4bec086cfd471c
MD5 719fe795648ce3f8b168ea9d5ea5aa05
BLAKE2b-256 8411f8d58ec614e6cbbd9e91b5a6e443f1d4ecff74f1bea57575be412a8bee7d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page