Skip to content

fix(docs): repair broken documentation site - #120

Merged
dogo merged 2 commits into
masterfrom
fix/docs-site-issues
Sep 14, 2026
Merged

dogo merged 2 commits into
masterfrom
fix/docs-site-issues

Conversation

@dogo

@dogo dogo commented Sep 14, 2026

Copy link
Copy Markdown
Owner

Audit of https://dogo.github.io/oslib/ — crawled all 115 published pages and validated every link, anchor and asset, then reproduced the Doxygen build locally to confirm each root cause.

Broken on the live site

_virtual_file_8h.html returned 404, while being linked from 6 pages (files.html, oslib_8h.html, the src directory page and 3 struct pages).

GitHub Pages runs Jekyll, which silently drops files whose name starts with an underscore. VirtualFile.h generates _virtual_file_8h.html (and _virtual_file_8h.js, used by the nav tree). The local build produces both; the published site has neither. Fixed by publishing a .nojekyll marker and copying with doc/html/. instead of the doc/html/* glob, which skipped dotfiles anyway.

The controller API had no field documentation. The OSL_KEYLIST page showed only value. All 18 button bitfields (cross, circle, up, start, …) are documented in keys.h but never rendered, and the "Data Fields" index linked to 26 anchors that did not exist. They live in an anonymous struct, which is itself undocumented and therefore removed by HIDE_UNDOC_MEMBERS, taking its documented members with it. Documenting the anonymous struct brings them back without exposing undocumented members elsewhere.

Incorrect content

  • OSL_KEY_BITS was documented as holding "bit numbers". Its values are the bit position plus one, so that 0 can mean "no key" in oslMake3Buttons (see messagebox.c: value & (1 << (key - 1))). Following the old text, 1 << OSL_KEY_CROSS selected SQUARE. The values are correct by design, so only the documentation changed.
  • Deprecated List was missing 2 of 5 entries. oslDrawTile and oslDrawImageSimple were described as deprecated in prose only, using @note or the brief, so they never reached deprecated.html.
  • Main page told the reader to click a "Modules" tab that Doxygen renames to "Topics", referred to an "official OSLib site" that was never linked, and advertised a set of tutorials that does not exist.

Configuration

  • STRIP_FROM_PATH still pointed at the original author's Windows folder, so every file page exposed the CI runner path (/home/runner/work/oslib/oslib/src/audio.h File Reference) and 6 useless directory pages were generated for /home, /home/runner, etc.
  • PROJECT_NUMBER was empty — the site showed no version. It is now derived from OSL_VERSION in src/oslib.h through the Makefile, so the version has a single source of truth.
  • SEARCHENGINE was off on a 130-page API reference.
  • PAPER_TYPE was set to the invalid value a4wide.
  • 8 of 18 headers lacked @file and so were absent from the File List.

Verification

Rebuilt with Doxygen 1.9.8 (the version the CI installs) and re-ran the link checker over the generated site:

  • 0 Doxygen content warnings, 0 broken links, 0 broken assets
  • OSL_KEYLIST 16/16 fields and OSL_REMOTEKEYLIST 7/7 rendering
  • File List 18/18 headers, Deprecated List 5/5, search and version present
  • Version sync checked end to end: bumping OSL_VERSION to 9.9.9 moved the site to 9.9.9, reverting moved it back
  • make clean && make exits 0 — the changes are comments and configuration only, no code

Known limitation

52 entries in the alphabetical "Data Fields" index still do not scroll to their row: Doxygen emits no per-member anchor for members of an anonymous struct in C. The links land on the correct page, where the fields are now visible. The only setting that resolves it, INLINE_SIMPLE_STRUCTS=YES, deletes all 27 struct pages (OSL_IMAGE, OSL_FONT, OSL_MAP, …), which is a worse regression. Before this PR the same index had 26 broken anchors and the fields did not exist at all.

GitHub Pages runs Jekyll, which silently drops files whose name starts
with an underscore. VirtualFile.h generates _virtual_file_8h.html, so
that page 404'd on the site while being linked from 6 other pages.
Publish a .nojekyll marker, and copy with "doc/html/." instead of the
"doc/html/*" glob, which skipped dotfiles.

Other configuration fixes:
- STRIP_FROM_PATH still pointed at the original author's Windows folder,
  so every file page exposed the CI runner path and 6 useless directory
  pages were generated.
- PROJECT_NUMBER is now derived from OSL_VERSION in src/oslib.h via the
  Makefile, keeping a single source of truth for the version.
- Enable SEARCHENGINE; the API reference has 130 pages and no search.
- PAPER_TYPE was set to the invalid value "a4wide".
OSL_KEY_BITS was documented as holding "bit numbers", but its values are
the bit position plus one, so that 0 can mean "no key" in
oslMake3Buttons. Following the old text (1 << OSL_KEY_CROSS) selected the
wrong button. Document the one-based convention and point to
OSL_KEY_MASKS and the named bitfields instead.

The 18 button bitfields of OSL_KEYLIST, and the 6 of OSL_REMOTEKEYLIST,
never appeared on the site: they live in an anonymous struct, which is
itself undocumented and therefore removed by HIDE_UNDOC_MEMBERS, taking
its documented members with it. Documenting the anonymous struct brings
them back without exposing undocumented members elsewhere.

Also:
- Add @file to the 8 headers that lacked it, so the File List covers all
  18 headers instead of 10.
- Mark oslDrawTile and oslDrawImageSimple with @deprecated; both were
  described as deprecated in prose only and were missing from the
  Deprecated List.
- Main page told the reader to click a "Modules" tab that Doxygen renames
  to "Topics", referred to an OSLib site that was never linked, and
  claimed a set of tutorials that does not exist.
@dogo
dogo force-pushed the fix/docs-site-issues branch from 8a7e6f3 to 5f85390 Compare September 14, 2026 13:22
@dogo
dogo merged commit c171f86 into master Sep 14, 2026
8 checks passed
@dogo
dogo deleted the fix/docs-site-issues branch September 14, 2026 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant