summaryrefslogtreecommitdiffstats
path: root/Utilities
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-12-06 15:07:31 (GMT)
committerStephen Kelly <steveire@gmail.com>2020-01-13 11:08:11 (GMT)
commitb1b7d01172b78cd3f301fb77117a3b7191ca1f20 (patch)
treee7ca84ac3b9f69e68dc2e64c66c3f797e17011d4 /Utilities
parente4c07116027e7c82fab658b11a630492052f3761 (diff)
downloadCMake-b1b7d01172b78cd3f301fb77117a3b7191ca1f20.zip
CMake-b1b7d01172b78cd3f301fb77117a3b7191ca1f20.tar.gz
CMake-b1b7d01172b78cd3f301fb77117a3b7191ca1f20.tar.bz2
Utilities/Sphinx: Index document types only by top level directory
We use the convention `Help/<type>/<doc>` for indexing each document as an object of type `<type>`. Split the document name on the first slash rather than the last slash so that multi-level documents like `Help/guide/tutorial/index.rst` are indexed as their top-level type.
Diffstat (limited to 'Utilities')
-rw-r--r--Utilities/Sphinx/cmake.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Utilities/Sphinx/cmake.py b/Utilities/Sphinx/cmake.py
index d903dbe..b9bf41b 100644
--- a/Utilities/Sphinx/cmake.py
+++ b/Utilities/Sphinx/cmake.py
@@ -251,7 +251,7 @@ class CMakeTransform(Transform):
env = self.document.settings.env
# Treat some documents as cmake domain objects.
- objtype, sep, tail = env.docname.rpartition('/')
+ objtype, sep, tail = env.docname.partition('/')
make_index_entry = _cmake_index_objs.get(objtype)
if make_index_entry:
title = self.parse_title(env.docname)