Machine readable metadata example

Organisation schema with people

How it looks (preview)

<script type="application/ld+json">
  {
  "@context": "http://schema.org",
  "@type": "GovernmentOrganization",
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://www.gov.uk/foo"
  },
  "name": "Ministry of Organisation",
  "description": null,
  "logo": "https://govuk-government-frontend.herokuapp.com/assets/government-frontend/govuk_publishing_components/govuk-logo-b15a4d254746d1642b8187217576d1e8fe50b51352d352fda13eee55d3c1c80a.png",
  "member": [
    {
      "@type": "Person",
      "honorificPrefix": "Minister",
      "image": "https://images.gov.uk/rufus.jpg",
      "name": "Rufus Scrimgeour MP",
      "url": "https://www.gov.uk/rufus-scrimgeour",
      "hasOccupation": [
        {
          "@type": "Role",
          "name": "Minister for Magic",
          "url": "https://www.gov.uk/minister-for-magic"
        },
        {
          "@type": "Role",
          "name": "Head of Auror Office",
          "url": "https://www.gov.uk/head-of-auror-office"
        }
      ]
    }
  ],
  "potentialAction": {
    "@type": "SearchAction",
    "description": "Find all content from Ministry of Organisation",
    "target": "https://www.gov.uk/search/all?keywords={query}\u0026order=relevance\u0026organisations%5B%5D=foo",
    "query": "required"
  }
}
</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="Ministry of Organisation" />
<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: "Ministry of Organisation",
    base_path: "/foo",
    details: {
      ordered_ministers: [
        {
          name_prefix: "Minister",
          name: "Rufus Scrimgeour MP",
          role: "Minister for Magic",
          href: "/rufus-scrimgeour",
          role_href: "/minister-for-magic",
          image: {
            url: "https://images.gov.uk/rufus.jpg"
          }
        },
        {
          name_prefix: "Minister",
          name: "Rufus Scrimgeour MP",
          role: "Head of Auror Office",
          href: "/rufus-scrimgeour",
          role_href: "/head-of-auror-office",
          image: {
            url: "https://images.gov.uk/rufus.jpg"
          }
        }
      ]
    }
  },
  schema: "organisation"
} %>