Restore the "API Documentation" link in sidebar when building with Doxygen >= 1.9.8 #2135
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I noticed yesterday that when building the local HTML Doxygen docs (as described in Appendix B of https://datasheets.raspberrypi.com/pico/raspberry-pi-pico-c-sdk.pdf ), if you use Doxygen 1.9.8 (as used by Ubuntu 24.04) or Doxygen 1.10.0 (as used by https://github.com/raspberrypi/documentation/blob/develop/.github/workflows/build.yml ) the main "API Documentation" link in the sidebar suddenly disappears! (which unfortunately makes the local HTML Doxygen pretty useless)
After much trial and error I eventually discovered that this was due to doxygen/doxygen#10562 (which seems like a big change to make in a patch-level version bump from 1.9.7 to 1.9.8).
My initial approach was to just edit
docs/DoxygenLayout.xml
directly to change<tab type="modules" ...
to<tab type="topics" ...
and then editdocs/CMakeLists.txt
to throw a fatal error if building with doxygen < 1.9.8 (which worked); but then I realised that we do still need to keep supporting older versions of Doxygen, because Raspberry Pi OS still includes doxygen 1.9.4 in its APT repositories.So that's why I came up with the slightly more "nuanced" approach seen here 😉
With this fix, the "API Documentation" link appears correctly, regardless of which version of Doxygen you use to build the local HTML Doxygen docs.