Zorto search is a DuckDB data app. Generate a public .ddb file with a search_pages table, ship it as a static asset, and point the theme at it.

Configure the theme #

Add the database location to config.toml:

[extra]
search_database_url = "/data/site.ddb"
search_database_file = "site.ddb"
search_database_schema = "site"

When search_database_url is set, the built-in theme adds the search button and modal. The browser imports DuckDB-Wasm only when someone opens search.

Create search_pages #

Your .ddb should include:

ColumnType
titletext
urltext
descriptiontext
contenttext
title_lowertext
description_lowertext
content_lowertext

zorto.dev builds this with website/bin/build-meta, a self-contained uv script that writes website/static/data/site.ddb.

Inspect the data #

Use DuckDB directly:

duckdb static/data/site.ddb "SELECT title, url FROM search_pages LIMIT 5;"