doc: exclude some HTML DIVs from search engine "snippets"
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é <benjamin@zephyrproject.org>
This commit is contained in:
parent
66fbf35435
commit
fc0a9c5655
2
doc/_templates/footer.html
vendored
2
doc/_templates/footer.html
vendored
|
@ -13,7 +13,7 @@
|
|||
</p>
|
||||
{%- set git_last_updated, sha1 = pagename | git_info | default((None, None), true) %}
|
||||
{%- if git_last_updated %}
|
||||
<div class="admonition tip">
|
||||
<div class="admonition tip" data-nosnippet>
|
||||
<p class="admonition-title">
|
||||
Help us keep our technical documentation accurate and up-to-date!
|
||||
</p>
|
||||
|
|
32
doc/_templates/layout.html
vendored
32
doc/_templates/layout.html
vendored
|
@ -1,12 +1,12 @@
|
|||
{% extends "!layout.html" %}
|
||||
{% block document %}
|
||||
{% if is_release %}
|
||||
<div class="wy-alert wy-alert-danger">
|
||||
<div class="wy-alert wy-alert-danger" data-nosnippet>
|
||||
The <a href="/latest/{{ pagename }}.html">latest development version</a>
|
||||
of this page may be more current than this released {{ version }} version.
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="wy-alert wy-alert-danger">
|
||||
<div class="wy-alert wy-alert-danger" data-nosnippet>
|
||||
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 %}
|
||||
<div class="toctree-wrapper compound">
|
||||
<p class="caption"><span class="caption-text">Reference</span></p>
|
||||
<ul>
|
||||
{% for title, url in reference_links.items() %}
|
||||
<li class="toctree-l1">
|
||||
<a class="reference internal" href="{{ url }}">{{ title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div data-nosnippet>
|
||||
{% include "zversions.html" %}
|
||||
{{ super() }}
|
||||
{% if reference_links %}
|
||||
<div class="toctree-wrapper compound">
|
||||
<p class="caption"><span class="caption-text">Reference</span></p>
|
||||
<ul>
|
||||
{% for title, url in reference_links.items() %}
|
||||
<li class="toctree-l1">
|
||||
<a class="reference internal" href="{{ url }}">{{ title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block extrahead %}
|
||||
<meta name="color-scheme" content="dark light">
|
||||
|
|
Loading…
Reference in a new issue