Skip to main content

Minimal static site generator for markdown vaults

Project description

Foliate

A static site generator for your markdown vault. A flexible, configurable alternative to Obsidian Publish.

cd my-vault
uvx foliate init   # Create .foliate/config.toml
uvx foliate build  # Generate site to .foliate/build/

Why Foliate?

  • Everything in your vault - All content, config, and output stay in your vault
  • Single executable - One tool to generate your website, no complex setup
  • Flexible - Just markdown files in, a website out

Features

  • Zero config - Works out of the box with sensible defaults
  • Vault-native - Everything lives in .foliate/ inside your vault
  • Two-tiered visibility - Control what's public vs. published
  • Incremental builds - Only rebuilds changed files
  • Watch mode - Auto-rebuild on file changes
  • Works with any markdown - Obsidian, Logseq, or plain markdown files

Quick Start

# Initialize in your vault
cd my-vault
uvx foliate init

# Build
uvx foliate build

# Watch mode (build + serve + auto-rebuild)
uvx foliate watch

Directory Structure

my-vault/
├── .foliate/
│   ├── config.toml      # Configuration
│   ├── build/           # Generated site
│   ├── cache/           # Build cache
│   ├── templates/       # Custom templates (optional)
│   └── static/          # Custom CSS/JS (optional)
├── _private/            # Ignored - never built
├── _homepage/           # Site root (/, /about/, etc.)
│   └── about.md         # → example.com/about/
├── assets/              # Images, PDFs
├── Home.md              # → example.com/wiki/Home/
└── Notes/
    └── ideas.md         # → example.com/wiki/Notes/ideas/

Special Directories

Directory Purpose
_private/ Never built, regardless of frontmatter. Configurable via ignored_folders in config.
_homepage/ Content deployed to site root (/) instead of /wiki/ (or other prefix). Excluded from normal wiki generation.

Visibility System

Control what gets built and listed:

---
public: true       # Built and accessible via direct link
published: true    # Also appears in listings and search
---
  • No frontmatter or public: false → Not built (private)
  • public: true → Built, accessible via URL
  • public: true, published: true → Built AND visible in listings

Configuration

.foliate/config.toml:

[site]
name = "My Wiki"
url = "https://example.com"

[build]
ignored_folders = ["_private", "drafts"]
wiki_prefix = "wiki"  # URL prefix for wiki content (set to "" for root)

[nav]
items = [
    { url = "/about/", label = "About" },
    { url = "/wiki/Home/", label = "Wiki" },
]

Commands

foliate init      # Create .foliate/config.toml
foliate build     # Build site
foliate watch     # Build + serve + auto-rebuild
foliate clean     # Remove build artifacts

Options

foliate build --force     # Force full rebuild
foliate build --verbose   # Detailed output
foliate build --serve     # Start server after build
foliate watch --port 3000 # Custom port

Deployment

Foliate generates static files in .foliate/build/. Deploy anywhere that serves static files:

rsync (VPS/Server)

rsync -avz --delete .foliate/build/ user@server:/var/www/mysite/

GitHub Pages

Separate repo - e.g., push to a dedicated username.github.io repo:

# Clone your GitHub Pages repo alongside your vault
git clone git@github.com:username/username.github.io.git ../username.github.io

# Copy build output and push
cp -r .foliate/build/* ../username.github.io/
cd ../username.github.io && git add . && git commit -m "Deploy" && git push

Same repo - If your vault is the GitHub Pages repo:

# Option 1: Use docs/ folder (configure GitHub Pages to serve from docs/)
cp -r .foliate/build/* docs/

# Option 2: Use gh-pages branch (requires Node.js)
npx gh-pages -d .foliate/build

Simple local copy

cp -r .foliate/build/* /path/to/webserver/

License

MIT

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

foliate-0.1.2.tar.gz (28.2 kB view details)

Uploaded Source

Built Distribution

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

foliate-0.1.2-py3-none-any.whl (27.4 kB view details)

Uploaded Python 3

File details

Details for the file foliate-0.1.2.tar.gz.

File metadata

  • Download URL: foliate-0.1.2.tar.gz
  • Upload date:
  • Size: 28.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.12

File hashes

Hashes for foliate-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f149a3d58e7121e58500479439738e1ac64b41bfbe7261d1f74f4d195cd5fc99
MD5 22f8aaca68f9d1e030913addd869e34b
BLAKE2b-256 3333a53f9298c04031ad8c9442754d4ea194a7882803ecae6c9a20f3b3227fc2

See more details on using hashes here.

File details

Details for the file foliate-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: foliate-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 27.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.12

File hashes

Hashes for foliate-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d28adcad971e2c58fb355eeba0e5722a60a92ef2f5a36df4c8cfb10f874acc04
MD5 f0ebdd28404f5d690fcd118ebadea821
BLAKE2b-256 132802d97482b3444dd465694eb4d8ce1e1daf2e7c1615b3b71ba93408ef2c6c

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