-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include Titles in FileItems #88
base: main
Are you sure you want to change the base?
Conversation
Thanks for submitting your first pull request! You are awesome! 🤗 |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Codecov ReportBase: 91.06% // Head: 91.14% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #88 +/- ##
==========================================
+ Coverage 91.06% 91.14% +0.07%
==========================================
Files 7 7
Lines 739 745 +6
==========================================
+ Hits 673 679 +6
Misses 66 66
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
This fixes an issue where
sphinx-autoupdate
does not pick up changes to titles in the_toc.yaml
file.To reproduce, use the example project,
sphinx-autobuild --port 8001 . _build/
title
attributes to one of the files, egapi.md
You'll see that the change does not get picked up. The reason is that line 251 of
api.py
does an equality check on the items in the sitemap:prev_doc = previous[name]
.Since the title is included in the
Document
class, the changes in 2. and 3. above trigger a rebuild of theapi.md
. But the ToC is injected into theintro.md
file, which is unchanged both as a file and from the point of view of theget_changed
function.By including the titles on
FileItems
, such changes get picked up byget_changed
and the ToC updates correctly.