Site: English version, PHP and statuses guides, per-page share images
Merged
DE
17d ago+6669+6669+0123456789012345678901234567890123456789-134-134-012345678901234567890123456789
Closes #9, closes #10, closes #11.
English version (#9)
en/contains the home page and the 8 carrier pages, written for English searches ("Yalidine API for Node.js and PHP", etc.), not translated word for word.- Every page, FR and EN, has the same three
hreflanglinks (fr,en,x-default→ FR), plusog:localeandog:locale:alternate, and a FR / EN button in the navigation. build-site.shpublishesen/, andsitemap.xmlnow lists thexhtml:linkalternates (22 URLs).- The 404 page is bilingual.
Docs on the site (#10)
php/↔en/php/: the PHP / Laravel guide (fromdocs/guide-php.md).statuts/↔en/statuses/: the 7 unified statuses, models, error codes, theShippingProviderinterface and client construction (fromdocs/CONTRACT.md).- Each carrier page, FR and EN, gets a native status → unified status table, taken from
docs/PROVIDERS.md. ZRExpress is marked as a draft, as in the source. - Site links to
guide-php.mdandCONTRACT.mdnow point to these pages.PROVIDERS.mdandZREXPRESS.mdstay on GitHub because they are contributor docs.
Share images (#11)
scripts/og/generate.mjsuses headless Chrome to generate one 1200×630 image per page and language (21 images inassets/og/, about 2 MB), with no npm dependencies.og:imageandtwitter:imagenow point to these images. The FR home page keepsassets/og.png.
CI
scripts/check-site.mjschecks the built site: canonical URL = own URL,hreflangtargets exist and point back, share images exist, and every relative link and asset resolves. Locally: 22 pages OK.
To check after merging
- Search Console: the sitemap is re-read automatically. The "International targeting / hreflang" report should not show any errors.
- Facebook Sharing Debugger / LinkedIn Post Inspector on a carrier page, to see the new image.
🤖 Generated with Claude Code
Summary by cubic
Adds an English version of the website, publishes the PHP guide and unified statuses as web pages, and generates one share image per page and language. Closes #9, #10, and #11.
New Features
en/mirrors the home page and 8 carrier pages, written for English searches; every page pairs with its French version via reciprocalhreflanglinks and a FR/EN nav switch, andsitemap.xmllists all 22 URLs.php/andstatuts/(plus English variants) bringguide-php.mdandCONTRACT.mdonto the site; each carrier page gains a native → unified status table.scripts/og/generate.mjsrenders one 1200×630 image per page and language with headless Chrome and no npm dependencies.scripts/check-site.mjsruns in CI and validates canonicals, reciprocalhreflang, share images, and relative links in the built site.
Bug Fixes
- Corrects code examples across FR and EN pages against
packages/tsandpackages/php: webhook secret handling,ClientOptionswrapping, status tables with exact mapper keys, and try-block SDK calls. - The Maystro webhook example now treats the event only as a signal and re-reads the order with
track(), so a forged event cannot set a status. - Hardens the scripts:
check-siterequires exactly the fr/en/x-default alternates and checks404.html;og/generaterejects unknown keys;build-siterewrites sitemap alternates toSITE_URLand rejects backslashes in it.