Explorar o código

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

jeremystretch %!s(int64=3) %!d(string=hai) anos
pai
achega
3c32c09a5a
Modificáronse 2 ficheiros con 2 adicións e 3 borrados
  1. 2 2
      docs/_theme/main.html
  2. 0 1
      mkdocs.yml

+ 2 - 2
docs/_theme/main.html

@@ -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 %}

+ 0 - 1
mkdocs.yml

@@ -38,7 +38,6 @@ plugins:
             show_root_toc_entry: false
             show_source: false
 extra:
-  readthedocs: !ENV READTHEDOCS
   social:
     - icon: fontawesome/brands/github
       link: https://github.com/netbox-community/netbox