From fc0a9c5655b0ea19e50546330cf4c1163b034826 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Cab=C3=A9?= Date: Tue, 7 Nov 2023 10:56:12 +0100 Subject: [PATCH] doc: exclude some HTML DIVs from search engine "snippets" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some portions of the documentation do not make sense when shown as "snippets" in search engines' results. Use "data-nosnippet" attribute to instruct search engines (Google for sure, hopefully others in the future) to exclude them. Signed-off-by: Benjamin Cabé --- doc/_templates/footer.html | 2 +- doc/_templates/layout.html | 32 +++++++++++++++++--------------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/doc/_templates/footer.html b/doc/_templates/footer.html index 54ba724acb3..757bb27529d 100644 --- a/doc/_templates/footer.html +++ b/doc/_templates/footer.html @@ -13,7 +13,7 @@

{%- set git_last_updated, sha1 = pagename | git_info | default((None, None), true) %} {%- if git_last_updated %} -
+

Help us keep our technical documentation accurate and up-to-date!

diff --git a/doc/_templates/layout.html b/doc/_templates/layout.html index 205b2488555..6d58c015548 100644 --- a/doc/_templates/layout.html +++ b/doc/_templates/layout.html @@ -1,12 +1,12 @@ {% extends "!layout.html" %} {% block document %} {% if is_release %} -
+
The latest development version of this page may be more current than this released {{ version }} version.
{% else %} -
+
This is the documentation for the latest (main) development branch of Zephyr. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version. @@ -15,20 +15,22 @@ {{ super() }} {% endblock %} {% block menu %} - {% include "zversions.html" %} - {{ super() }} - {% if reference_links %} -
-

Reference

-
    - {% for title, url in reference_links.items() %} -
  • - {{ title }} -
  • - {% endfor %} -
+
+ {% include "zversions.html" %} + {{ super() }} + {% if reference_links %} +
+

Reference

+
    + {% for title, url in reference_links.items() %} +
  • + {{ title }} +
  • + {% endfor %} +
+
+ {% endif %}
- {% endif %} {% endblock %} {% block extrahead %}