Machine readable metadata example

Organisation schema with related orgs

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": "Magical Artefacts Agency",
  "description": null,
  "logo": "http://components.publishing.service.gov.uk/assets/govuk_publishing_components/govuk-logo-a4dbec48c2dea64aa4fa26dbec4203fd6506d714570f207ed1c4bae7359680f4.png",
  "parentOrganization": [
    {
      "@context": "http://schema.org",
      "@type": "GovernmentOrganization",
      "sameAs": "https://www.gov.uk/ministry-of-magic"
    }
  ],
  "subOrganization": [
    {
      "@context": "http://schema.org",
      "@type": "GovernmentOrganization",
      "sameAs": "https://www.gov.uk/dodgy-wands-commission"
    }
  ],
  "potentialAction": {
    "@type": "SearchAction",
    "description": "Find all content from Magical Artefacts Agency",
    "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="Magical Artefacts Agency" />
<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: "Magical Artefacts Agency",
    base_path: "/foo",
    details: {
    },
    links: {
      ordered_parent_organisations: [
        {
          title: "Ministry of Magic",
          base_path: "/ministry-of-magic"
        }
      ],
      ordered_child_organisations: [
        {
          title: "Dodgy Wands Commission",
          base_path: "/dodgy-wands-commission"
        }
      ]
    }
  },
  schema: "organisation"
} %>