Machine readable metadata example
With canonical url
How it looks (preview)
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Article",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://www.gov.uk/foreign-travel-advice/andorra/health"
},
"name": "A title",
"datePublished": null,
"dateModified": null,
"text": null,
"publisher": {
"@type": "Organization",
"name": "GOV.UK",
"url": "https://www.gov.uk",
"logo": {
"@type": "ImageObject",
"url": "https://govuk-collections.herokuapp.com/assets/collections/govuk_publishing_components/govuk-logo-b8553f688131fad665e52a8c2df7633f9cd1c0fffb9f69703cc68c728e7b3b74.png"
}
},
"image": [
"https://govuk-collections.herokuapp.com/assets/collections/govuk_publishing_components/govuk-schema-placeholder-1x1-2672c0fb7a5d5f947d880522c509ebe7f2be090885883cc94418f6860e812e15.png",
"https://govuk-collections.herokuapp.com/assets/collections/govuk_publishing_components/govuk-schema-placeholder-4x3-194fde4197f00e669f6f52c182df2ed707bfb2024c9ef39f7a2ed20da62b90eb.png",
"https://govuk-collections.herokuapp.com/assets/collections/govuk_publishing_components/govuk-schema-placeholder-16x9-30e6c0e035636ee6b9dc72ae254bcd4a925182805afe7c5b7170cf2394894b28.png"
],
"headLine": "A title",
"description": null
}
</script>
<link rel="canonical" href="https://www.gov.uk/foreign-travel-advice/andorra/health" />
<meta property="og:site_name" content="GOV.UK" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://www.gov.uk/foreign-travel-advice/andorra/health" />
<meta property="og:title" content="A title" />
<meta property="og:description" content="" />
<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",
canonical_url: "https://www.gov.uk/foreign-travel-advice/andorra/health"
} %>