This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is the source for duckdb.org — a Jekyll 4.4.1 static site hosting the DuckDB documentation, blog, and marketing pages.
# Ruby dependencies
bundle install
# Python virtual environment
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt# Serve locally (current/lts only, faster — recommended for most editing)
scripts/serve-latest.sh
# Serve full site including all archived versions
scripts/serve.sh
# Run linters (markdownlint, vale, black)
scripts/lint.sh
# Auto-fix lint issues
scripts/lint.sh -f
# Run black manually (always use --skip-string-normalization)
black --skip-string-normalization <file>
# Run DuckDB queries (use the CLI, not Python)
duckdb -c "SELECT 42"
# Always activate venv for Python scripts
source venv/bin/activateVisit http://localhost:4000/docs/ (use HTTP, not HTTPS).
Jekyll with Kramdown/GFM markdown. Navigation menus are driven by JSON data files, not auto-discovered from files.
docs/current/— current stable release (target for most PRs)docs/lts/— LTS releasedocs/1.3/,docs/1.2/, etc. — archived versions (rarely edited)
The _config_exclude_archive.yml config is used by serve-latest.sh to skip archived versions for faster local builds.
- Create a Markdown file using
snake_casenaming indocs/ - Add an entry to
_data/menu_docs_lts.jsonfor sidebar navigation - For a new guide, also add a link in
docs/current/guides/overview.md
Many pages under docs/current/sql/functions/ are auto-generated. Check scripts/generate_all_docs.sh before editing — do not edit generated content directly. Source data lives in the duckdb/duckdb repository.
Every doc page uses Jekyll front matter:
---
layout: docu
title: Page Title
---Always use Jekyll link tags (not relative paths):
{% link docs/current/sql/statements/select.md %}Link tags cause build failures if the target doesn't exist, catching broken links at build time.
- No hard line breaks; do not use
<br/>or double trailing spaces - Unordered lists use
*(not-); 4-space indentation for nesting - Use
""and''for smart quotes - Page title goes in front matter
title:only — do not repeat as anh1in the body - Body headers:
##,###,####only - Header capitalization: Chicago Manual of Style
- Spelling: American English, no Oxford comma
| Tag | Renders as |
|---|---|
sql |
SQL, no prompt |
plsql |
SQL with D prompt |
batch |
Shell with $ prompt |
bash |
Shell, no prompt |
text |
Plain output |
console |
Error messages |
- Uppercase keywords:
SELECT,FROM,WHERE - Lowercase function names:
cos(),date_part() snake_casefor table/column names- 4-space indentation, trailing semicolons, commas at end of line
- Placeholders use
⟨angle brackets⟩(not<>,[], or{}) - Do not include the
Dprompt in SQL examples
Blockquotes render as colored callout boxes. Types: Note (default), Warning, Tip, Bestpractice, Deprecated.
- Prepend
<div class="monospace_table"></div>for code-heavy output tables - Prepend
<div class="center_aligned_header_table"></div>for centered headers