Skip to content

Add metatags for search result filtering

Follow-up from #21 (closed)

The Nanoc site provides two meta tags that we use to enhance Google search:

  1. gitlab-docs-section - used to filter results by category
  2. gitlab-docs-breadcrumbs - used to show the breadcrumb trail alongside each result

These are important features since many page titles on the Docs site look the same, but are aimed at different audiences (e.g, Namespaces vs Namespaces).

These features work on the Hugo site now because Google is still crawling the Nanoc site, but we will need to recreate these in Hugo before launching.

An attempt was made here, but this approach dramatically increases build time: !118 (closed)

We may need to handle these prior to the Hugo build, instead of at the template level, in order to maintain good compile performance and fast pipelines.

One way to do this could be to generate a separate YAML file that contains the built breadcrumb trail using a Go or node.js script, then use that at the template level to populate the meta tags.