OgImageOptions
type OgImageOptions =
{
FrontMatterKeys: string list
AltKeys: string list
Fallback: Page -> OgImage option
Default: OgImage option
ExcludeCollections: string list
}| Assembly | Partas.Nacara.Plugins.OgImage |
Options of the og-image plugin.
Fields
FrontMatterKeys: string list
FrontMatterKeys: string listThe front matter keys a page names its image under, first match wins.
The value is a path or url, or a mapping with url, alt, width and height. false opts the page out, fallbacks included.
Defaults to [ "og_image"; "ogImage"; "image" ].
AltKeys: string list
AltKeys: string listThe front matter keys the image's alt text is read from, beside a plain path.
Defaults to [ "og_image_alt"; "ogImageAlt"; "image_alt" ].
Fallback: Page -> OgImage option
Fallback: Page -> OgImage optionThe image of a page whose front matter names none.
Asked before Default, so a collection or a section can have its own card: fun page -> if page.Collection = "blog" then Some(OgImage.image "/blog-card.png") else None.
Defaults to fun _ -> None.
Default: OgImage option
Default: OgImage optionThe image of every page nothing else gave one.
Defaults to None, which leaves such a page without an image.