Skip to content

Generate the GitHub profile README from the site - #4

Merged
carstenb merged 8 commits into
masterfrom
profile-readme-sync
Sep 26, 2026
Merged

carstenb merged 8 commits into
masterfrom
profile-readme-sync

Conversation

@carstenb

Copy link
Copy Markdown
Owner

Generates the profile README for carstenb/carstenb from this site and publishes it with an Action. The profile repo becomes build output only.

What it does

  • profile/build.js takes identity from the JSON-LD and the claim, topics, Mandoria headline, companies and contact from index.html, and fills profile/README.template.md, which holds the GitHub-specific copy.
  • The claim becomes a header SVG in the site's fonts and colours, with light and dark versions.
  • Extraction is strict: missing or duplicated structure fails the build, as do em dashes and all-caps lines.
  • validate now runs the build, so a markup change that breaks it fails on the PR.
  • sync-profile-readme.yml builds on merge (only when an input changed) and mirrors README.md + assets/ into carstenb/carstenb with rsync --delete. It commits only when something changed.
  • profile/ and build/ stay out of the Pages artifact and the byte budget.

Before merging

  • Add the Actions secret PROFILE_REPO_TOKEN: a fine-grained token for carstenb/carstenb only, Contents: Read and write.

Verified locally

  • npm run check passes.
  • Guard cases fail with a named field: no h1, second mailto, blank topic, empty logo alt, renamed Mandoria tag, claim without comma, all-caps text.
  • A fifth topic is numbered 05.
  • Stale output files are removed; a failed build leaves the output untouched.
  • Rendered through GitHub's Markdown API in light and dark.

🤖 Generated with Claude Code

carstenb and others added 8 commits September 26, 2026 16:05
profile/build.js reads identity from the JSON-LD and the claim, topics,
Mandoria headline, companies and contact from index.html, and fills
profile/README.template.md, which holds the GitHub-specific copy.
Extraction fails loudly on missing or duplicated structure, and the
output is checked for em dashes and all-caps lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The claim becomes an SVG with Gabarito and Caveat Brush embedded, the
CarBo logo and colours read from the site.css tokens, in a light and a
dark version. The line breaks after the claim's first comma; a claim
without one fails the build instead of guessing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Builds first, then mirrors README.md and assets/ into the profile repo
with rsync --delete and commits only when something changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
validate runs profile/build.js so extraction breakage fails the PR. The
Pages artifact and the byte budget skip profile/ and the local build/
output.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Header variant B (SVG header, no portrait) and the role line from the
JSON-LD are now fixed; the preview-only --header and --role switches are
gone. The tagline moves into the header SVG in Space Mono on the site's
--signal yellow, sized exactly because the font is monospaced. It stays
template copy, carried as a directive comment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The header displays at 560px instead of the full README width, so the
claim reads about as large as a heading. The tagline grows to 18px in
the SVG to stay legible at that scale, and the SVG widens to fit it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GitHub Markdown allows neither background nor text colour, so the
tagline becomes a link to the site's topics section, which GitHub shows
in its link blue. The header SVG shrinks back to logo, name and claim,
and no longer embeds Space Mono.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@carstenb
carstenb merged commit 349398a into master Sep 26, 2026
2 checks passed
@carstenb
carstenb deleted the profile-readme-sync branch September 27, 2026 14:26
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