feat: render the tool repo's LICENSE as a dynamic site page - #3
Merged
Conversation
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>
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.
Summary
LICENSEfrom the flashtrace clone at build time (from the repo root next to thedocs/build input) instead of linking to the GitHub blob./license/in a newsrc/license.mjs, using the same page shell andpage-legalstyling as the impressum page. A<pre>preserves the license's space-centered formatting./license/and add the page to the sitemap.LICENSEis missing, matching the existing docs contract.Since the license is read at build time, it tracks the tool repo automatically whenever
deploy.ymlrebuilds on a new flashtrace release - same as the docs.Testing
pnpm buildpasses (13 pages, flashtrace v0.7.0).dist/license/index.htmlcontains the full 169-line Apache 2.0 text, correctly UTF-8 encoded, with no remaining GitHub license links anywhere insrc/.🤖 Generated with Claude Code