Skip to content
docgen

docgen 0.4.0

S3-compatible asset offload, and the first new crate since the initial release: docgen-s3 (eleven crates now publish in lockstep).

Large attachments do not belong in a git repo or a Pages artifact. With an [s3] section configured and credentials present, a production build uploads them to a bucket and rewrites their URLs. The uploader is content-hashed and idempotent: it lists the bucket once, then puts only what is missing, so rebuilding an unchanged site uploads nothing. A build-time AssetUrlResolver hook in docgen-core keeps the rewrite pass unaware of S3 entirely — the leaf crate owns all the I/O.

Two guards shipped with it. Dev mode never offloads, so local iteration cannot write to a real bucket. And the list prefix is trimmed of stray slashes: without that, a configured prefix = "/assets" listed under /assets while keys lived under assets/, so the diff found nothing present and re-uploaded everything, every build.

The feature is opt-in (cargo install docgen-rs --features s3) and off by default.