feat(report): custom logo paths on the title page#16
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Reports were limited to the vendored logos (INF, MAKERS, …). A report can now bring its own logo via the
logo/logosfrontmatter key:How
logo_pathresolves a custom file path in addition to vendored names.logo_output_namedisambiguates custom paths with a short hash (so two logos sharing a stem — or clashing with a vendored name — don't collide inlogos/); vendored names keep their clean output name.HSRTReport.logosoverrides the title-page logo set (None→ the variant default); used by the title overlay and the inline-logo materialisation.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
reportwith a custom PNG logo compiles and the logo renders on the title page (replacing INF). 744 tests pass; ruff + mypy --strict + basedpyright clean.🤖 Generated with Claude Code