Machine readable metadata example
With description
How it looks (preview)
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Article",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://www.gov.uk/foo"
},
"name": "A title",
"datePublished": null,
"dateModified": null,
"text": "Some manually set description of the page",
"publisher": {
"@type": "Organization",
"name": "GOV.UK",
"url": "https://www.gov.uk",
"logo": {
"@type": "ImageObject",
"url": "https://components.publishing.service.gov.uk/assets/govuk_publishing_components/govuk-logo-e5962881254c9adb48f94d2f627d3bb67f258a6cbccc969e80abb7bbe4622976.png"
}
},
"image": [
"https://components.publishing.service.gov.uk/assets/govuk_publishing_components/govuk-schema-placeholder-1x1-5ceffac04f7f6d4f421bd1d36dbb723ef48c15426d7f77f90be80a83af3c747e.png",
"https://components.publishing.service.gov.uk/assets/govuk_publishing_components/govuk-schema-placeholder-4x3-fcfe16abb1a015848e50d2ea797666a9eaf5158dca38ddfb1e52dc8c0543ab74.png",
"https://components.publishing.service.gov.uk/assets/govuk_publishing_components/govuk-schema-placeholder-16x9-fcf616879a7b37970df4d2117de962e08f7d057674ef1af6063dcdd529424eee.png"
],
"headLine": "A title",
"description": "Some manually set description of the page"
}
</script>
<link rel="canonical" href="https://www.gov.uk/foo" />
<meta property="og:site_name" content="GOV.UK" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://www.gov.uk/foo" />
<meta property="og:title" content="A title" />
<meta property="og:description" content="Some manually set description of the page" />
<meta name="twitter:card" content="summary" />
How to call this example
<%= render "govuk_publishing_components/components/machine_readable_metadata", {
content_item: {
title: "A title",
base_path: "/foo",
details: {
}
},
schema: "article",
description: "Some manually set description of the page"
} %>