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.TwitterCard

Twitter Card metadata, as described at https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started. This feature should be used alongside Hakyll.Web.Meta.OpenGraph. The following properties are supported:

twitter:card

Hardcoded

card type =

"summary"

.

twitter:creator

Optional

author's Twitter user name. Taken from

twitter-creator

context field, if set.

twitter:site

Optional

publication's Twitter user name. Taken from

twitter-site

context field, if set.

To use, add openGraphField and twitterCardField to the template context:

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

and update the template:

<head>
  <title>$title$</title>
  <link rel="stylesheet" type="text/css" href="/css/default.css" />
  $if(opengraph)$$opengraph$$endif$
  $if(twitter)$$twitter$$endif$
</head>
  • 1 value
  • Packagehakyll-4.17.0.0
  • Exports1
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceTwitterCard.hs