isPreview - speced/respec GitHub Wiki

isPreview

Type: boolean Default: false

Adds a prominent warning banner to the document indicating that this is a preview and should not be cited or referenced. Used for preview deployments (e.g. pull request previews) to distinguish them from official versions.

Basic usage

var respecConfig = {
  isPreview: true,
};

With pull request link

When prNumber and prUrl are also set, the banner includes a link to the pull request:

var respecConfig = {
  isPreview: true,
  prNumber: 123,
  prUrl: "https://github.com/example/spec/pull/123",
};

Notes

  • Shows a <details> warning banner — intentionally attention-grabbing
  • When prNumber + prUrl are present, the banner identifies which pull request this preview is for
  • Useful for PR preview deployments to avoid readers accidentally citing a draft-of-a-draft
  • Do not set in production specs
⚠️ **GitHub.com Fallback** ⚠️