Skip to content

docs: Set up Doxygen + Doxygen Awesome for SDK reference documentation#453

Merged
kirre-bylund merged 3 commits into
devfrom
docs/1461-doxygen-setup
Apr 8, 2026
Merged

docs: Set up Doxygen + Doxygen Awesome for SDK reference documentation#453
kirre-bylund merged 3 commits into
devfrom
docs/1461-doxygen-setup

Conversation

@kirre-bylund
Copy link
Copy Markdown
Contributor

@kirre-bylund kirre-bylund commented Apr 8, 2026

Summary

Sets up Doxygen with the Doxygen Awesome CSS theme as the documentation generator for the Unity SDK, and adds a CI workflow that packages and publishes the generated docs.

Closes lootlocker/index#1461
Part of lootlocker/index#1203


Screenshots

Landing page — branding, quick-start, feature navigation table

landing

Topic page (Authentication) — feature-grouped methods with brief descriptions

topic-authentication

Types (Class List) — full annotated class listing

types

What ships where

Path Committed Exported in package
.doxygen/ ❌ stripped via .gitattributes export-ignore
docs/html/ ❌ git-ignored ✅ generated output ships with SDK

documentationUrl in package.json already points to https://docs.lootlocker.com/ — Unity Package Manager surfaces this as the Documentation button. The release workflow zips docs/html/ as docs-{version}.zip for the offline use case.


Changes

.doxygen/ — all generation config

  • DoxyfileINPUT = Runtime/, excludes Libraries/, Editor/, LootLockerEndPoints.cs, LootLockerObfuscator.cs, LootLockerValidation.cs; EXTRACT_ALL=NO; HIDE_UNDOC_MEMBERS=YES; INTERNAL_DOCS=NO; JAVADOC_AUTOBRIEF=YES; output → docs/html/
  • doxygen-awesome/doxygen-awesome.css + doxygen-awesome-sidebar-only.css from jothepro/doxygen-awesome-css
  • custom-layout-fixes.css — 500px sidebar, branding padding, sidebar background extension, hides the floating top-nav bar to remove the double-offset whitespace
  • lootlocker-theme.css — LootLocker green colour overrides
  • nav-customization.js — two-phase nav tree restructuring: enums moved into Types, Topics hoisted to root level, LootLocker.Requests.LootLockerSDKManager. namespace prefix stripped from sidebar method labels (preserved as tooltip)
  • DoxygenLayout.xml — Types before Topics; pages/modules/namespaces hidden from nav
  • header.html / footer.html — custom HTML wrapping with script injection for nav-customization.js
  • sync-nav.sh — syncs the mainpage.md navigation table from groups.dox in CI (run before doxygen)

.github/workflows/generate-docs.yml

Trigger Behaviour
PR to main or dev Syncs nav table, runs Doxygen — validates no errors
Push to main Generates docs, uploads sdk-docs-{sha} artifact (30-day retention)
Release published Generates, zips, attaches docs-{version}.zip to the GitHub release
Manual dispatch Generates on demand

Source annotations

  • Runtime/Game/LootLockerSDKManager.cs@ingroup tags on all public methods
  • Runtime/Game/Requests/FriendsRequest.cs — added XML <summary> to 8 undocumented classes
  • Runtime/Client/LootLockerErrorData.cs, Runtime/Client/LootLockerRequestContext.cs — doc improvements

Verification

doxygen .doxygen/Doxyfile
  • Exit code: 0
  • Warnings: 0
  • Errors: 0
  • Internal types confirmed absent from output

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Sets up a Doxygen-based reference documentation pipeline for the LootLocker Unity SDK, including the Doxygen Awesome theme, custom styling/navigation tweaks, and a GitHub Actions workflow to generate and publish/attach the generated docs.

Changes:

  • Added a Doxygen configuration bundle under .doxygen/ (theme, layout, main page, groups, nav customization, and sync script).
  • Added a CI workflow to generate docs on PRs/pushes/releases and upload artifacts / attach release zips.
  • Improved/added XML documentation summaries on a handful of SDK response/types.

Reviewed changes

Copilot reviewed 17 out of 21 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
scripts/Sync-DocsNavigation.ps1 PowerShell alternative for syncing mainpage navigation from groups.dox.
Runtime/Game/Requests/FriendsRequest.cs Adds <summary> docs to previously undocumented request/response DTOs.
Runtime/Client/LootLockerRequestContext.cs Adds class-level XML docs for request context.
Runtime/Client/LootLockerErrorData.cs Adds class-level XML docs for error payload type.
.gitignore Ignores generated Doxygen output at docs/html/ and adds temp dirs.
.github/workflows/generate-docs.yml New workflow to sync nav, run Doxygen, upload artifacts, and attach release zip.
.gitattributes Excludes .doxygen/ from exported archives via export-ignore.
.doxygen/sync-nav.sh Bash/Python script to regenerate the mainpage nav table from groups.dox.
.doxygen/nav-customization.js Post-processes Doxygen nav tree to reorganize Topics/Types and shorten labels.
.doxygen/mainpage.md Adds the docs landing page content, quick start, and navigation table.
.doxygen/lootlocker-theme.css LootLocker branding/theme overrides for Doxygen Awesome.
.doxygen/images/lootlocker-logo.png Logo asset used in header/mainpage.
.doxygen/header.html Custom HTML header with LootLocker top nav + theme toggle behavior.
.doxygen/groups.dox Defines feature/topic groups used to build “Topics” navigation.
.doxygen/footer.html Custom footer and injection of nav-customization.js.
.doxygen/DoxygenLayout.xml Custom layout ordering (Types before Topics) and tab visibility configuration.
.doxygen/doxygen-awesome/doxygen-awesome.css Vendored Doxygen Awesome CSS theme.
.doxygen/doxygen-awesome/doxygen-awesome-sidebar-only.css Vendored sidebar-only variant of the theme.
.doxygen/Doxyfile Doxygen configuration (inputs, exclusions, HTML output, theme assets).
.doxygen/custom-layout-fixes.css Additional layout fixes (sidebar width, offsets, search box, height issues).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/generate-docs.yml
Comment thread .github/workflows/generate-docs.yml Outdated
Comment thread .github/workflows/generate-docs.yml Outdated
Comment thread .doxygen/DoxygenLayout.xml Outdated
Comment thread .doxygen/DoxygenLayout.xml Outdated
Comment thread .doxygen/sync-nav.sh
Comment thread scripts/Sync-DocsNavigation.ps1 Outdated
Comment thread .doxygen/mainpage.md Outdated
@kirre-bylund kirre-bylund force-pushed the docs/1461-doxygen-setup branch from 0f44f3f to 8c0d8ea Compare April 8, 2026 08:20
Comment thread .github/workflows/generate-docs.yml
Comment thread .github/workflows/generate-docs.yml Outdated
Comment thread .github/workflows/generate-docs.yml Outdated
- Add .doxygen/ with Doxyfile, Doxygen Awesome theme, custom CSS, nav JS,
  layout, header/footer, and LootLocker branding
- Add .github/workflows/generate-docs.yml: validates on PR, uploads artifact
  on push to main, attaches docs-{version}.zip to releases
- Add .gitattributes: export-ignore for .doxygen/, .github/, Tests/ etc.
- Update .gitignore: exclude docs/html/ generated output
- Add @InGroup and XML doc annotations to source files for featured coverage

Closes lootlocker/index#1461
Part of lootlocker/index#1203
- Split workflow into two jobs: generate-docs (contents: read) and attach-release (contents: write) to avoid giving write access on PR runs
- Add apt-get update before doxygen install to avoid stale package index failures
- Add --clobber to gh release upload to make re-runs idempotent
- Fix duplicate visible attribute in DoxygenLayout.xml namespace and file sections
- Fix CRLF line-ending handling in sync-nav.sh regex lookahead
- Fix 'id' -> 'ID' in mainpage.md response conventions table
- Remove duplicate scripts/Sync-DocsNavigation.ps1 (not referenced anywhere, duplicated .doxygen/sync-nav.sh)
- Only upload artifact on release and workflow_dispatch, not push to main
- Name artifact sdk-docs-{version} from package.json instead of sdk-docs-{sha}
- Pass version between jobs via job outputs
@kirre-bylund kirre-bylund force-pushed the docs/1461-doxygen-setup branch from 0a8ceb9 to 0c9268c Compare April 8, 2026 20:42
@kirre-bylund kirre-bylund merged commit 8708aa2 into dev Apr 8, 2026
8 checks passed
@kirre-bylund kirre-bylund deleted the docs/1461-doxygen-setup branch April 8, 2026 20:42
@JohannesLoot
Copy link
Copy Markdown
Contributor

@kirre-bylund
Some feedback:

  • Replace all the Descriptions at the top with the Detailed Description and remove the Detailed Description section
  • Remove the first "condensed" list of functions (there is a list to the left in the sidebar)
  • The sidebar liost does not have the same sorting order as the list on the Web Page

It is fully functional without these changes and we can alway iterate on it later.
Depending on how much control you have over these things with Doxygen, you can disregard anything if it is too much work.

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.

3 participants