Skip to content

Commit

Permalink
Ensure deterministic toctree
Browse files Browse the repository at this point in the history
  • Loading branch information
khanxmetu committed Sep 15, 2024
1 parent 0438178 commit afd81d9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sphinx/builders/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,9 @@ def write(
docnames.add(tocdocname)
docnames.add(self.config.root_doc)

# sort to ensure deterministic toctree generation
self.env.toctree_includes = dict(sorted(self.env.toctree_includes.items()))

with progress_message(__('preparing documents')):
self.prepare_writing(docnames)

Expand Down

0 comments on commit afd81d9

Please sign in to comment.