Skip to content

preview-contexts.yaml reference

Sample readers for the previewer. Each is what the entitlement service would produce for a signed-in reader.

contexts:
  self-hoster:
    org: acme
    products: [core]
    version: '0.1'
  managed-customer:
    org: globex
    products: [hosted, embed]
    features: []
    version: '0.1'
FieldDefaultMeaning
orgnoneShown in the banner, and on the cover of PDFs printed in the previewer. It does not affect filtering.
products[]Products the reader's organization holds.
features[]Features the reader's organization holds.
versionrequiredThe release the reader runs, such as 0.1. Quote it.

Each name becomes an entry in the banner's Preview as list, and a value for --as. A malformed file is reported as invalid-preview-contexts.

Choosing sample readers

Cover each combination that changes what readers see: every product, the features that gate whole topics, and each release line you publish. Also include a reader with nothing, to check that the ungated pages still make sense on their own. The previewer only shows these readers; it does not check them against your real organizations.