Skip to content
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

Restore the "API Documentation" link in sidebar when building with Doxygen >= 1.9.8 #2135

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

lurch
Copy link
Contributor

@lurch lurch commented Dec 11, 2024

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)
Screenshot from 2024-12-11 14-34-16

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 edit docs/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.
Screenshot from 2024-12-11 14-45-26

@lurch lurch added documentation Improvements or additions to documentation build labels Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant