From 3c32c09a5a1a1156340193c2d6eda98c8a4876eb Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Wed, 28 Sep 2022 09:30:38 -0400 Subject: [PATCH] Fixes #10496: Use page.canonical_url to identify ReadTheDocs builds --- docs/_theme/main.html | 4 ++-- mkdocs.yml | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/_theme/main.html b/docs/_theme/main.html index 4dfc4e14e..3ff44b9cb 100644 --- a/docs/_theme/main.html +++ b/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/' %} {% endif %} {% endblock %} diff --git a/mkdocs.yml b/mkdocs.yml index 530c6d52e..a10fd6e67 100644 --- a/mkdocs.yml +++ b/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