1. Component Guide
  2. Machine readable metadata
  3. Government service schema
Machine readable metadata example

Government service schema

How it looks (preview)

<script type="application/ld+json">
  {
  "@context": "http://schema.org",
  "@type": "GovernmentService",
  "name": "Apply for your first dragon",
  "description": "Apply for your first dragon from the Ministry of Dragons online",
  "url": "https://www.gov.uk/apply-for-your-first-dragon"
}
</script>

<link rel="canonical" href="https://www.gov.uk/apply-for-your-first-dragon" />

<meta property="og:site_name" content="GOV.UK" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://www.gov.uk/apply-for-your-first-dragon" />
<meta property="og:title" content="Apply for your first dragon" />
<meta property="og:description" content="Apply for your first dragon from the Ministry of Dragons online" />

  <meta name="twitter:card" content="summary" />

How to call this example

<%= render "govuk_publishing_components/components/machine_readable_metadata", {
  content_item: {
    title: "Apply for your first dragon",
    base_path: "/apply-for-your-first-dragon",
    description: "Apply for your first dragon from the Ministry of Dragons online",
    details: {
    }
  },
  schema: "government_service"
} %>