DocShell.Presentation.Page (DocShell v0.5.0)

Copy Markdown View Source

Holds the complete renderer-neutral record for one documentation page.

It joins one qualified source document to its canonical route, anchored AST, provenance, locale and audience, search/navigation visibility, reading flow, and renderer capability requirements. All local links and heading anchors are resolved before the value is returned by DocShell.Presentation.SiteProjector.

A page never carries raw head HTML, executable callbacks, scripts, framework component names, application sessions, or authorization decisions. metadata, banner, and hero remain inert JSON records; their interpretation belongs to the selected host profile and renderer. Source and edit URLs are inert links: DocShell validates them but never assumes a source-hosting provider.

Summary

Types

t()

A validated page ready for any conforming renderer.

Types

t()

@type t() :: %DocShell.Presentation.Page{
  audience: String.t() | [String.t()] | nil,
  banner: map() | nil,
  breadcrumbs: [DocShell.Presentation.Breadcrumb.t()],
  canonical_url: String.t() | nil,
  collection_id: String.t(),
  content: [DocShell.Ast.ast_node()],
  content_digest: String.t(),
  description: String.t() | nil,
  document_id: String.t(),
  edit_url: String.t() | nil,
  headings: [DocShell.Presentation.Heading.t()],
  hero: map() | nil,
  id: String.t(),
  kind: String.t(),
  last_modified: String.t() | nil,
  locale: String.t(),
  metadata: map(),
  navigation?: boolean(),
  next: DocShell.Presentation.Link.t() | nil,
  package_version: String.t(),
  previous: DocShell.Presentation.Link.t() | nil,
  requirements: [DocShell.Presentation.Renderer.CapabilityRequirement.t()],
  route: String.t(),
  search?: boolean(),
  source_path: String.t() | nil,
  source_revision: String.t(),
  source_url: String.t() | nil,
  status: String.t() | nil,
  tags: [String.t()],
  template: :document | :splash,
  title: String.t()
}

A validated page ready for any conforming renderer.