Fixes #10496: Use page.canonical_url to identify ReadTheDocs builds

This commit is contained in:
jeremystretch
2022-09-28 09:30:38 -04:00
parent 8019761364
commit 544d3bbbfb
2 changed files with 2 additions and 3 deletions

View File

@@ -2,8 +2,8 @@
{% block site_meta %}
{{ super() }}
{# Disable search indexing unless we're building for ReadTheDocs #}
{% if not config.extra.readthedocs %}
{# Disable search indexing unless we're building for ReadTheDocs (see #10496) #}
{% if page.canonical_url != 'https://docs.netbox.dev/' %}
<meta name="robots" content="noindex">
{% endif %}
{% endblock %}