feat(docs): bilingual onboarding guide + fix the favicon - #11
Merged
Merged
Conversation
…icon Adds a language button beside the theme button. Both languages live in the same file: every section carries a <div lang="pt-BR"> and a <div lang="en">, and a data-lang attribute on the root hides one of the two. Switching is instant, the choice is remembered, and a first-time visitor gets whichever language their browser asks for. One file rather than two was deliberate. The repository already keeps two README files in sync by hand and CONTRIBUTING has to ask contributors to remember; here the translations sit adjacent, so an edit to one has the other in view. The HTML ships data-lang="pt" so a reader without JavaScript still gets a single-language page rather than both at once, and the CSS only ever writes display:none rules, so a shown block keeps the display its own styles gave it — .facts is flex, and a display:block here would flatten it. The favicon link pointed at ../media/favicon.png. Since docs/ is the published root, that resolves above the site, into the organization's own Pages site, which happens to serve a byte-identical file at that path — so it loaded by coincidence and would break the day that site reorganized its assets. It also declared image/x-icon for a PNG. The icon now ships inside docs/ and is declared image/png. Co-Authored-By: Claude Opus 5 (1M context) <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.
Two things: the guide now switches between Portuguese and English with a button, and it serves its own favicon instead of borrowing one.
The favicon was wrong — but not in the way it looks
docs/is the published root of this site, so../media/favicon.pngresolves tohttps://tooark.com/media/favicon.png— above this project, in the organization's own Pages site.It loads. By coincidence: that other site happens to serve the same file at the same path. The day it reorganizes its assets, the icon here disappears with no change in this repository. It also declared
type="image/x-icon"for a PNG.The icon now ships as
docs/favicon.pngand is declaredimage/png. Single copy, inside the site that uses it.Bilingual guide
A language button sits beside the theme button. Both languages live in the same file: every section carries a
<div lang="pt-BR">and a<div lang="en">, anddata-langon the root hides one of the two.Why one file and not two. The repository already keeps
README.mdandREADME.pt-BR.mdin sync by hand, andCONTRIBUTING.mdhas to ask contributors to remember. Here the translations sit adjacent, so editing one puts the other in view. There is nocheck-sync.shfor prose — this is the next best thing.Two implementation details worth reviewing:
data-lang="pt"in the markup, so a reader without JavaScript gets a single-language page rather than both at once.display: none. It never writes a "show" rule, so a visible block keeps the display its own styles gave it —.factsisflex, and adisplay: blockhere would flatten it.The theme button label follows the language, and the choice is stored in
localStorage(wrapped in try/catch). A first-time visitor gets whichever language their browser asks for.Verified
The diagram in section 07 has an English twin with its own
markerid, so no duplicate IDs. The<!--email_off-->wrappers from #10 are carried into the English copies too.Affected area(s)
docs/— onboarding guideConsumer impact
Checklist
python3 scripts/validate-templates.pypasses./scripts/check-sync.shpassesCHANGELOG.mdupdated under[Unreleased]🤖 Generated with Claude Code