1. Collections Component Guide
  2. Meta Tags
  3. With taxonomy added via document type
Meta Tags example

With taxonomy added via document type

You can trigger taxonomy tag rendering by either including a document_type attributes of “taxon” or including the parent_taxons or taxons attributes under the links attribute.

How it looks (preview)

<meta name="govuk:format" content="taxon">
  <meta name="govuk:content-id" content="00000000-0000-0000-0000-000000000000">
  <meta name="govuk:themes" content="example-of-taxons">
  <meta name="govuk:taxon-id" content="00000000-0000-0000-0000-000000000000">
  <meta name="govuk:taxon-ids" content="00000000-0000-0000-0000-000000000000">
  <meta name="govuk:taxon-slug" content="example-of-taxons">
  <meta name="govuk:taxon-slugs" content="example-of-taxons">

How to call this example

<%= render "govuk_publishing_components/components/meta_tags", {
  content_item: {
    content_id: "00000000-0000-0000-0000-000000000000",
    document_type: "taxon",
    base_path: "/example-of-taxons"
} %>