summaryrefslogtreecommitdiff
path: root/sphinx/environment.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/environment.py')
-rw-r--r--sphinx/environment.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/sphinx/environment.py b/sphinx/environment.py
index d5e12eb1..d04fcbf9 100644
--- a/sphinx/environment.py
+++ b/sphinx/environment.py
@@ -1131,6 +1131,8 @@ class BuildEnvironment:
return entries
maxdepth = maxdepth or toctree.get('maxdepth', -1)
+ if not titles_only and toctree.get('titlesonly', False):
+ titles_only = True
# NOTE: previously, this was separate=True, but that leads to artificial
# separation when two or more toctree entries form a logical unit, so