Skip to content

feat: render the tool repo's LICENSE as a dynamic site page - #3

Merged
MentorFilou merged 5 commits into
mainfrom
feat/license-page
Jul 17, 2026
Merged

feat: render the tool repo's LICENSE as a dynamic site page#3
MentorFilou merged 5 commits into
mainfrom
feat/license-page

Conversation

@MentorFilou

Copy link
Copy Markdown
Member

Summary

  • Fetch LICENSE from the flashtrace clone at build time (from the repo root next to the docs/ build input) instead of linking to the GitHub blob.
  • Render it verbatim at /license/ in a new src/license.mjs, using the same page shell and page-legal styling as the impressum page. A <pre> preserves the license's space-centered formatting.
  • Point the footer License link at /license/ and add the page to the sitemap.
  • The build fails loudly if LICENSE is missing, matching the existing docs contract.

Since the license is read at build time, it tracks the tool repo automatically whenever deploy.yml rebuilds on a new flashtrace release - same as the docs.

Testing

  • pnpm build passes (13 pages, flashtrace v0.7.0).
  • Verified dist/license/index.html contains the full 169-line Apache 2.0 text, correctly UTF-8 encoded, with no remaining GitHub license links anywhere in src/.

🤖 Generated with Claude Code

MentorFilou and others added 5 commits July 17, 2026 22:36
Fetch LICENSE from the flashtrace clone at build time (next to the
docs/ input), render it verbatim in a <pre> at /license/, and point
the footer link there instead of github.com. Fails the build loudly
if the file is missing, same as the docs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The 46rem doc column hugged the left of the 80rem section and the
<pre> stretched wider than its 77-column text, so the license looked
off-center. Center the legal content column, widen the license page
to 52rem, center its heading, and shrink-wrap the <pre> to its text
so the raw file's space-centered header reads as intended.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Show the familiar permissions/limitations/conditions overview (as on
github.com and choosealicense.com) above the raw license text, with a
short description and a not-legal-advice note. The panel only renders
when the fetched LICENSE is recognized as Apache 2.0, so a future
license change falls back to the raw text instead of a wrong summary.
Adds --ok/--no/--info color tokens to both themes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A labeled rule (Full license text) between the summary panel and the
raw <pre> block makes the two sections read as distinct.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Match the first two non-blank lines (Apache License / Version 2.0)
instead of substring-scanning the full text, so a future license that
merely mentions Apache 2.0 in its body cannot trigger the summary.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@MentorFilou
MentorFilou merged commit d39d117 into main Jul 17, 2026
1 check passed
@MentorFilou
MentorFilou deleted the feat/license-page branch July 17, 2026 22:36
@MentorFilou MentorFilou self-assigned this Jul 20, 2026
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