Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSarah German <sgerman@gitlab.com>2023-04-13 21:06:55 +0300
committerSarah German <sgerman@gitlab.com>2023-04-13 21:06:55 +0300
commit57323229caf7fac332424023cd6ad36716620b58 (patch)
tree7040967cb7c2571017cceaa726520106eb78e9f1
parent8020b156e4c65e95005c5fcf914eb81961e58e8e (diff)
Add data-nosnippet attribute to templates
This prevents Google from including text from these sections in search result previews. See also: https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag\#data-nosnippet-attr
-rw-r--r--layouts/feedback.html2
-rw-r--r--layouts/footer.html2
-rw-r--r--layouts/global_nav.html2
3 files changed, 3 insertions, 3 deletions
diff --git a/layouts/feedback.html b/layouts/feedback.html
index e77bbad1..f0891e81 100644
--- a/layouts/feedback.html
+++ b/layouts/feedback.html
@@ -1,5 +1,5 @@
<% if @item[:feedback].nil? %>
-<div class="help-and-feedback-section mb-5">
+<div class="help-and-feedback-section mb-5" data-nosnippet>
<a
data-toggle="collapse"
href="#help-feedback-content"
diff --git a/layouts/footer.html b/layouts/footer.html
index fac3d52b..3a44c548 100644
--- a/layouts/footer.html
+++ b/layouts/footer.html
@@ -1,4 +1,4 @@
-<footer class="px-3 border-top footer">
+<footer class="px-3 border-top footer" data-nosnippet>
<div class="row py-2">
<div class="col-9">
<a href="https://gitlab.com/dashboard" target="_blank"><img src="/assets/images/gitlab-logo.svg" alt="Sign in to GitLab.com" aria-hidden="true" role="img"><span class="gl-sr-only">Sign in to GitLab.com</span></a>
diff --git a/layouts/global_nav.html b/layouts/global_nav.html
index aacce628..deb60385 100644
--- a/layouts/global_nav.html
+++ b/layouts/global_nav.html
@@ -1,5 +1,5 @@
<% navigation = Gitlab::Navigation.new(@items, @item) %>
-<nav class="global-nav-content">
+<nav class="global-nav-content" data-nosnippet>
<!-- nav sections -->
<% navigation.children.each do |sec| %>
<% sec_uuid = SecureRandom.uuid %>