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

JSON-LD metadata, using Schema.org vocabulary for articles. Google applications and other search engines use these data to improve search results and links.

This implementation supports the following fields:

@type

Hardcoded

value

"Article"

.

headline

Required

taken from context field

title

.

datePublished

Required

date of publication, via

dateField

.

To use, add a jsonldField to your template context:

let
  context = defaultContext <> …
  postContext =
    context
    <> jsonldField "jsonld" context

And update the template:

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

The "embed" argument generates a <script …> tag to be directly included in page HTML. To get the raw JSON string, use "raw" instead.

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