Skip to content

feat(docs): bilingual onboarding guide + fix the favicon - #11

Merged
paulosfjunior merged 1 commit into
mainfrom
feat/docs-i18n
Sep 22, 2026
Merged

paulosfjunior merged 1 commit into
mainfrom
feat/docs-i18n

Conversation

@paulosfjunior

Copy link
Copy Markdown
Contributor

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.png resolves to https://tooark.com/media/favicon.png — above this project, in the organization's own Pages site.

href="../media/favicon.png"  ->  https://tooark.com/media/favicon.png
                                 HTTP 200, 7795 bytes, byte-identical

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.png and is declared image/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">, and data-lang on the root hides one of the two.

Why one file and not two. The repository already keeps README.md and README.pt-BR.md in sync by hand, and CONTRIBUTING.md has to ask contributors to remember. Here the translations sit adjacent, so editing one puts the other in view. There is no check-sync.sh for prose — this is the next best thing.

Two implementation details worth reviewing:

  • The HTML ships data-lang="pt" in the markup, so a reader without JavaScript gets a single-language page rather than both at once.
  • The CSS only ever writes display: none. It never writes a "show" rule, so a visible block keeps the display its own styles gave it — .facts is flex, and a display: block here 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

tags desbalanceadas ....... 0
ids duplicados ............ nenhum
seções pareadas ........... 11/11  (pt=1 en=1 h2=2 em cada)
check-sync.sh ............. all checks passed, seção 4 incluída
validate-templates.py ..... all templates valid

The diagram in section 07 has an English twin with its own marker id, so no duplicate IDs. The <!--email_off--> wrappers from #10 are carried into the English copies too.

Affected area(s)

  • docs/ — onboarding guide

Consumer impact

  • No consumer-visible change

Checklist

  • python3 scripts/validate-templates.py passes
  • ./scripts/check-sync.sh passes
  • CHANGELOG.md updated under [Unreleased]
  • No version pins changed

🤖 Generated with Claude Code

…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>
@paulosfjunior
paulosfjunior merged commit b61482b into main Sep 22, 2026
5 checks passed
@paulosfjunior
paulosfjunior deleted the feat/docs-i18n branch September 22, 2026 22:31
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