Skip to content
Margo dev

Document schema

#

This schema describes the generic metadata and Margo-owned rendering preferences accepted in Markdown frontmatter. Consumer-owned metadata remains available outside the Margo namespace.

Margo document metadata v1

Known generic metadata and closed Margo-owned rendering preferences. Consumer-owned root properties remain allowed.

  • authors array

    Ordered author display names.

    Constraints
    maxItems=64; uniqueItems=true
  • description string

    Plain-text summary for page and artifact metadata.

    Constraints
    maxLength=512
  • language string

    BCP 47-style document language tag.

    Constraints
    pattern="^[A-Za-z]{2,8}(?:-[A-Za-z0-9]{1,8})*$"; maxLength=64
  • margo object

    Closed namespace for non-authoritative Margo document preferences and site publication controls.

    Constraints
    default={}
    • actions object

      Optional site publication controls. PDF publication also retains the Markdown source.

      Constraints
      default={}
      • markdown boolean

        Retain the original Markdown source and expose copy/view actions in configured HTML sites.

        Constraints
        default=false
      • pdf boolean | string | object

        Generate a pre-rendered PDF artifact and retain the original Markdown source, or use client browser print without generating a PDF artifact. The object form can include exact chart-data tables in pre-rendered output.

        • mode string

          How the PDF action is fulfilled.

          Constraints
          enum=["pre-rendered","client"]; default="pre-rendered"
        • printChartData boolean

          Include the exact chart-data tables in pre-rendered PDF output.

          Constraints
          default=false
    • imageViewer boolean

      Enable zoom, pan, expanded and fullscreen views for standalone Markdown images with a title/caption. Inline images, linked thumbnails and images without captions stay static.

      Constraints
      default=false
    • page object

      Optional PDF page preferences overridden by explicit CLI or API values.

      Constraints
      default={}
      • imageOverflow string

        Controls whether print images are capped at 70% of the page viewport height while preserving their intrinsic aspect ratio.

        Constraints
        enum=["limit","allow"]; default="limit"
      • margins object

        Optional physical page margins in millimeters; omitted sides retain the target default and explicit zero requests full bleed on that side. PDF documents default to 24/22/26/22 mm while decks default to zero.

        • bottom number

          Bottom page margin in millimeters.

          Constraints
          minimum=0
        • left number

          Left page margin in millimeters.

          Constraints
          minimum=0
        • right number

          Right page margin in millimeters.

          Constraints
          minimum=0
        • top number

          Top page margin in millimeters.

          Constraints
          minimum=0
      • orientation string

        Preferred page orientation.

        Constraints
        enum=["portrait","landscape"]; default="portrait"
      • size string

        Preferred physical page size.

        Constraints
        enum=["A4","Letter"]; default="A4"
  • modifiedAt string

    Last-modified timestamp in RFC 3339 form.

    Constraints
    format="date-time"
  • publication_links object

    Optional host-owned links for declared author and tag names in native site publication metadata. Omitted names remain plain text.

    • authors object
    • tags object
  • publishedAt string

    Publication timestamp in RFC 3339 form.

    Constraints
    format="date-time"
  • slug string

    Optional lowercase, hyphen-separated consumer slug.

    Constraints
    pattern="^[a-z0-9]+(?:-[a-z0-9]+)*$"; maxLength=128
  • social_image object

    Optional configured-site social preview. The path is relative to this Markdown source, with an optional leading ./; the image is published even in inline asset mode. Supports PNG, JPEG, GIF and WebP up to 8 MiB. Omission uses the site fallback.

    • alt string required
      Constraints
      minLength=1; maxLength=512
    • path string required
      Constraints
      minLength=1
  • tags array

    Consumer-visible document tags.

    Constraints
    maxItems=64; uniqueItems=true
  • title string

    Human-readable document title.

    Constraints
    minLength=1; maxLength=256

Used by