Site: English version, PHP and statuses guides, per-page share images

Merged
DE
17d ago
+6669-134

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 hreflang links (fr, en, x-default → FR), plus og:locale and og:locale:alternate, and a FR / EN button in the navigation.
  • build-site.sh publishes en/, and sitemap.xml now lists the xhtml:link alternates (22 URLs).
  • The 404 page is bilingual.

Docs on the site (#10)

  • php/ ↔ en/php/: the PHP / Laravel guide (from docs/guide-php.md).
  • statuts/ ↔ en/statuses/: the 7 unified statuses, models, error codes, the ShippingProvider interface and client construction (from docs/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.md and CONTRACT.md now point to these pages. PROVIDERS.md and ZREXPRESS.md stay on GitHub because they are contributor docs.

Share images (#11)

  • scripts/og/generate.mjs uses headless Chrome to generate one 1200×630 image per page and language (21 images in assets/og/, about 2 MB), with no npm dependencies.
  • og:image and twitter:image now point to these images. The FR home page keeps assets/og.png.

CI

  • scripts/check-site.mjs checks the built site: canonical URL = own URL, hreflang targets 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 reciprocal hreflang links and a FR/EN nav switch, and sitemap.xml lists all 22 URLs.
  • php/ and statuts/ (plus English variants) bring guide-php.md and CONTRACT.md onto the site; each carrier page gains a native → unified status table.
  • scripts/og/generate.mjs renders one 1200×630 image per page and language with headless Chrome and no npm dependencies.
  • scripts/check-site.mjs runs in CI and validates canonicals, reciprocal hreflang, share images, and relative links in the built site.

Bug Fixes

  • Corrects code examples across FR and EN pages against packages/ts and packages/php: webhook secret handling, ClientOptions wrapping, 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-site requires exactly the fr/en/x-default alternates and checks 404.html; og/generate rejects unknown keys; build-site rewrites sitemap alternates to SITE_URL and rejects backslashes in it.