Skip to content

feat(report): custom logo paths on the title page#16

Merged
frederikbeimgraben merged 1 commit into
mainfrom
feat/report-custom-logos
Jun 3, 2026
Merged

feat(report): custom logo paths on the title page#16
frederikbeimgraben merged 1 commit into
mainfrom
feat/report-custom-logos

Conversation

@frederikbeimgraben
Copy link
Copy Markdown
Owner

What

Reports were limited to the vendored logos (INF, MAKERS, …). A report can now bring its own logo via the logo / logos frontmatter key:

logos: [INF, /path/to/brand.svg]   # vendored names and/or file paths
# or a single one:
logo: assets/orglogo.png

How

  • logo_path resolves a custom file path in addition to vendored names.
  • logo_output_name disambiguates custom paths with a short hash (so two logos sharing a stem — or clashing with a vendored name — don't collide in logos/); vendored names keep their clean output name.
  • HSRTReport.logos overrides the title-page logo set (None → the variant default); used by the title overlay and the inline-logo materialisation.
  • The builder reads logos/logo (list or scalar) and resolves file paths to absolute so they load from the build dir.

Footer logos / skyline stay variant-driven; this overrides the title-page logos.

Verification

A report with a custom PNG logo compiles and the logo renders on the title page (replacing INF). 744 tests pass; ruff + mypy --strict + basedpyright clean.

README's frontmatter list will get a logos line once #15 (README refresh) merges, to avoid a conflict.

🤖 Generated with Claude Code

Reports could only use the vendored logos (INF, MAKERS, ...). Allow a
report to specify its own logo via the `logo`/`logos` frontmatter key:

    logos: [INF, /path/to/brand.svg]   # vendored names and/or file paths

- `logo_path` now resolves a custom file path in addition to vendored
  names; `logo_output_name` disambiguates custom paths with a short hash
  so two logos sharing a stem don't collide in `logos/` (vendored names
  keep their clean output name).
- `HSRTReport` gains a `logos` override (None -> the variant default) used
  by the title-page overlay and the inline-logo materialisation.
- The report builder reads `logos`/`logo` (list or scalar) and resolves
  file paths to absolute so they load from the build directory.

Verified end to end: a `report` with a custom PNG logo compiles and the
logo renders on the title page. Tests + mypy --strict + basedpyright clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@frederikbeimgraben frederikbeimgraben merged commit 4e0bbe1 into main Jun 3, 2026
1 check passed
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