CDN for documentation

Serve documentation pages, examples and downloads from the edge. Refresh navigation and search indexes with each release, and retain URLs for supported versions.

Example release policy
Versioned resource
/docs/v2/reference.pdf
Refresh on publication
/docs/search-index.json

Publish versioned documentation and search assets

Cache the docs build at Cloud CDN. Purge on CI. Keep preview deployments off the public cache.

Cache published documentation

Readers can retrieve fresh pages from cache while the publishing origin handles updates and cache misses.

Search indexes and assets cached

Client search JSON, fonts and screenshots are stored at the edge.

Build pipeline purge

Each docs release invalidates HTML so new pages are live immediately.

Configuration

Cloud CDN overview
  1. Publish the docs build to an origin

    Hugo, Docusaurus, MkDocs or any static output.

  2. Cache pages and hashed assets

    Long TTL for fingerprinted files, purgeable HTML.

  3. Add purge to docs CI

    After the build, invalidate the docs hostname HTML.

  4. Map docs.example.com

    Attach TLS and cut over DNS.

Operational outcomes

  • Documentation is served globally
  • CI purge makes releases immediate
  • Preview sites stay off public cache
  • The product API origin is not a docs server

Frequently asked questions

Does this work with Docusaurus and MkDocs?

Yes. Any static docs generator can be a Cloud CDN origin.

How should versioned docs be cached?

Cache each version path separately. Immutable old versions can use long TTLs.

Can I password-protect internal docs?

Use token authentication or keep internal docs on a private origin that Cloud CDN does not cache publicly.

What about client-side search?

Cache the search index JSON like any other static asset.