Skip to content

Add inclusion/exclusion tags to page templates

Done when

Site-wide template content (e.g, links in the footer, the global nav, text in the header) are excluded from the Elasticsearch index. We only want the index to contain things we want search to find and consider when ranking.

Seems like the easiest way to do this is add an include tag data-elastic-include around the primary content and a data-elastic-exclude around the help & feedback box.

Implementation notes

See https://www.elastic.co/guide/en/enterprise-search/current/crawler-content.html#crawler-content-inclusion-and-exclusion.

This will also close gitlab-org/gitlab-docs#1593 (closed).

Edited by Sarah German