HORIZON HASKELLDocslts/ghc-10.0.x8c2f8e82026-10-19Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8c2f8e8 · 2026-10-19

Modulehakyll-4.17.0.0Haskell2010

Hakyll.Web.Meta.OpenGraph

Open Graph metadata, as described at https://ogp.me/. This implementation supports the following properties:

og:type

Hardcoded

value

"article"

og:url

Required

concatenation of

root

and

url

context fields, both of which are required.

og:title

Required

title of article, from

title

field.

og:description

Optional

brief description taken from context field

og-description

, if set.

og:image

Optional

image URL taken from context field

og-image

, if set.

To use, add openGraphField to the template context:

let
  context = defaultContext <> …
  postContext = context <> openGraphField "opengraph" context

and update the template:

<head>
  <title>$title$/title
  <link rel="stylesheet" type="text/css" href="/css/default.css" />
  $if(opengraph)$$opengraph$$endif$
</head>

See also Hakyll.Web.Meta.TwitterCard.

  • 1 value
  • Packagehakyll-4.17.0.0
  • Exports1
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceOpenGraph.hs