diff --git a/openstackdocstheme/theme/openstackdocs/localtoc.html b/openstackdocstheme/theme/openstackdocs/localtoc.html
index 5eb9b893..aaaeae46 100644
--- a/openstackdocstheme/theme/openstackdocs/localtoc.html
+++ b/openstackdocstheme/theme/openstackdocs/localtoc.html
@@ -1,6 +1,4 @@
-{%- if theme_sidebar_mode == 'toctree' %}
-{%- if display_toc %}
+{%- if theme_sidebar_mode == 'toctree' and theme_display_toc %}
{{ toc }}
{%- endif %}
-{%- endif %}
diff --git a/openstackdocstheme/theme/openstackdocs/theme.conf b/openstackdocstheme/theme/openstackdocs/theme.conf
index 85854ffc..42730f59 100644
--- a/openstackdocstheme/theme/openstackdocs/theme.conf
+++ b/openstackdocstheme/theme/openstackdocs/theme.conf
@@ -6,3 +6,4 @@ pygments_style = native
[options]
analytics_tracking_code = UA-17511903-1
sidebar_mode = toctree
+display_toc = True
diff --git a/releasenotes/notes/allow-disabling-toc-in-body-d98d3a6e633fa28e.yaml b/releasenotes/notes/allow-disabling-toc-in-body-d98d3a6e633fa28e.yaml
new file mode 100644
index 00000000..5eba8b25
--- /dev/null
+++ b/releasenotes/notes/allow-disabling-toc-in-body-d98d3a6e633fa28e.yaml
@@ -0,0 +1,14 @@
+---
+features:
+ - |
+ The automatic table of contents that appears in the body of the
+ documentation can be disabled by setting ``display_toc`` to ``False`` in
+ the ``html_theme_options`` option in ``conf.py``.
+
+ For example:
+
+ .. code-block:: python
+
+ html_theme_options = {
+ "display_toc": False,
+ }