Skip to main content

Bartleby

An agents-first, batteries-included Python static site generator: every page published for humans and the agents that read them.

Bartleby takes Markdown content and turns it into a fast, search-indexed, agent-readable website — with no plugin ecosystem to chase and no JavaScript build chain to maintain. Every feature most documentation sites want — feeds, sitemap, search, taxonomies, syntax highlighting, admonitions, JSON-LD, Open Graph tags, llms.txt — ships in the core.

Why Bartleby

Most static site generators treat AI agents as an afterthought. Bartleby treats them as a first-class audience alongside human readers. Every page is published as HTML for browsers, Markdown for LLM crawlers, and JSON-LD for structured-data consumers. The site root carries llms.txt and llms-full.txt so agents can navigate the corpus without crawling page-by-page.

For human authors, the surface area is small: write Markdown with YAML front matter, configure bartleby.yml, and run bartleby build. Everything else — markdown extensions, theme, feeds, search index — is wired up by default.

Quick start

uv pip install bartleby-ssg
bartleby new site mysite
cd mysite
bartleby new post "Hello world" --type blog
bartleby build

The rendered site lands in mysite/site/. For a live-reload preview, run bartleby serve.

Features

  • Markdown with markwright, pymdownx, and the standard Python-Markdown extensions
  • Built-in Material-style theme with Tailwind-friendly CSS, Alpine.js interactivity, dark mode
  • Search via a JSON index lunr.js consumes client-side
  • Feeds — RSS 2.0 and Atom 1.0 per content type
  • Sitemap + gzipped sitemap + robots.txt with AI crawler directives
  • SEO — Open Graph, Twitter Card, canonical URLs
  • LLM output — llms.txt, llms-full.txt, Markdown variants alongside every HTML page
  • Taxonomies — global and per-content-type listings
  • Pagination for listing pages
  • Cross-references — relative .md links rewritten to output URLs
  • Shortcodes — [% ... %] syntax for reusable Jinja2 fragments
  • Plugin hooks via hooks/*.py — no entry points, no subclassing
  • CLI with new site, new post, build, validate, serve
  • Dev server with change-driven rebuilds

Documentation

Full documentation lives in docs/ and is itself a Bartleby site. Build it locally:

cd docs
uv run bartleby build
open site/index.html

Or read the source directly:

Status

Version 0.1.0. The initial 27-step build plus the v0.1.0 hardening pass (18 delta steps) are complete; the project passes 507 tests under ruff strict and mypy --strict, including an end-to-end smoke test. The hardening pass vendored the real Alpine.js, HTMX, and lunr.js bundles, added the hybrid Tailwind compile pipeline, shipped the full icon packs, and closed the build-failure, agent-surface, and feed gaps from the audit.

A few items are intentionally deferred for follow-up releases:

  • Parallel build (asyncio + ProcessPoolExecutor); the build is synchronous and documented as such
  • Incremental rebuilds (--dirty)
  • Voice/tone content analysis for skill generation
  • A public theme API and additional themes

Development

git clone https://github.com/MasonEgger/bartleby.git
cd bartleby
uv sync
just check     # ruff lint + format, mypy strict, pytest

The Justfile exposes individual targets too: just lint, just typecheck, just test, just format.

Architecture

Bartleby is 18 source modules under src/bartleby/, organised by build pipeline phase:

  • Config layer — config.py, authors.py
  • Content layer — content.py, metadata.py, urls.py
  • Rendering — markdown_pipeline.py, shortcodes.py, templates.py, crossrefs.py
  • Structure — navigation.py, taxonomies.py, listings.py, pagination.py
  • Output — search.py, feeds.py, sitemap.py, seo.py, llm.py, assets.py, icons.py
  • Plugin system — plugins.py
  • Orchestration — build.py
  • Surfaces — cli.py, server.py
  • Theme — theme/ package with templates, partials, static assets, icons

See spec.md for the full specification and plan.md for the 27-step implementation roadmap that produced this codebase.

License

MIT. See LICENSE for the full text.

Metadata

Release files for bartleby-ssg 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bartleby-ssg 0.1.0
File Size Uploaded Provenance
bartleby_ssg-0.1.0.tar.gz 424.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for bartleby-ssg 0.1.0
File Interpreter ABI Platform
bartleby_ssg-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 587.8 kB

Release files / bartleby_ssg-0.1.0.tar.gz

Download URL bartleby_ssg-0.1.0.tar.gz
Size 424.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5b2a0084715af5e6b35ffd19f0ca24cf40c5c2a3cf9225e83571e8bcb6bb4a39
BLAKE2b-256 checksum
How to use checksums
f7597f8303dd897c2a37be9d2df13d065eba89962ab3d2f5ca5cba2ffdde86b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / bartleby_ssg-0.1.0-py3-none-any.whl

Download URL bartleby_ssg-0.1.0-py3-none-any.whl
Size 163.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a6dba6491d38ecad1c06b42de53c46d0ce0b55e6ec2c7a60e6901c1fce445278
BLAKE2b-256 checksum
How to use checksums
b35e2ad72cf520b9cf3f0b8e1095e95cd10f64e30bbee9b28751ec5386a2ca48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for bartleby-ssg 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page