Skip to content

Open Graph schema

Built-in id: ogp:article:1.0

Published at: https://hawkeyexl.github.io/manni/schemas/ogp/1.0.json

The Open Graph protocol basic properties plus the article object type. This is the built-in that checks something no build tool checks. Nothing fails when og:image is missing. The page builds and deploys perfectly, then renders as a grey box everywhere it is shared.

It is one of the metadata vocabularies, which describe a page to something outside your docs site.

Opt in for the pages you publish with social cards. Scope it with an override when only part of the site carries Open Graph tags:

manni.config.yaml
meta:
overrides:
- files: "site/**/*.html"
schemas:
- ogp:article:1.0
- x:cards:1.0

To try it once without config:

Terminal window
manni meta validate site/ -s ogp:article:1.0

In HTML these live on <meta property="…">. manni meta reads property alongside name, so an ordinary HTML page needs no special handling:

<meta property="og:title" content="Validate document metadata in CI" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://example.com/docs/ci" />
<meta property="og:image" content="https://example.com/img/card.png" />
PropertyTypeNotes
og:titlestringRequired. Non-empty.
og:typestringRequired. Not enumerated, because the protocol allows namespaced and vendor types.
og:urlURIRequired. Absolute. A site-root path is not a canonical URL.
og:imageURI | arrayRequired.
og:descriptionstringOne or two sentences.
og:site_namestring
og:determinerenuma, an, the, "", auto.
og:localestringlanguage_TERRITORY, such as en_US.
og:locale:alternatestring | arraySame form.
og:audio, og:videoURI | array
article:published_timedate-timeISO 8601.
article:modified_timedate-timeISO 8601.
article:expiration_timedate-timeISO 8601.
article:authorstring | array
article:sectionstring
article:tagstring | array

Allowed. A page may carry other og:* properties, other article:* properties, and any key of its own.

In front matter they are ordinary keys, quoted because they contain a colon:

---
"og:title": Validate document metadata in CI
"og:type": article
---

A page that passes carries all four required properties:

---
"og:title": Validate document metadata in CI
"og:type": article
"og:url": https://example.com/docs/ci
"og:image": https://example.com/img/card.png
"og:locale": en_US
---
✗ docs/ci.md
/og:locale must match pattern "^[a-z]{2,3}(_[A-Z]{2})?$" (line 6) [ogp:article:1.0]

Its companion for X is x:cards:1.0.