shreemaan-abhishek opened a new pull request, #2094:
URL: https://github.com/apache/apisix-website/pull/2094

   Follow-up to #2073.
   
   ## Architecture diagram
   
   The homepage architecture diagram was an exported `architecture.svg` with no 
source, so any change meant redrawing it from scratch. This replaces it with a 
generated PNG **plus the generator that produces it**:
   
   - `next/scripts/architecture/arch.html` is the drawing: a 1200x738 canvas of 
absolutely-positioned boxes plus one SVG layer for the connectors, so boxes and 
the wires that land on them share a coordinate space.
   - `next/scripts/architecture/render.sh` shoots it in headless Chrome at 2x 
and palette-reduces the result to `next/public/img/architecture.png` 
(2400x1476, ~73 KB).
   
   Edit the HTML and re-render; the PNG is generated output. Documented in 
`next/README.md`.
   
   Two notes on the script:
   
   - Chrome writes the screenshot and can then sit there instead of exiting, so 
`render.sh` waits on the output file and kills the process rather than waiting 
on it.
   - The diagram uses the system sans stack, so label widths follow the 
rendering machine's fonts. Re-rendering on macOS reproduces the committed PNG; 
elsewhere expect small shifts. This is called out in the script header.
   
   `HomePage.astro`, the mobile pan rule in `global.css`, and the asset 
assertion in `deploy.yml` all move from the SVG to the PNG.
   
   ## Dead Docusaurus section
   
   `website/src/components/sections/Architecture.tsx` still imported the old 
`Architecture-min.svg`. Since the Astro build replaces `index.html`, that 
section no longer reaches users, but it still compiled and pulled in a 35 KB 
SVG. Removed, along with its scss, the two SVGs it exclusively imported, and 
the now-dead `architecture.component.*` zh translations.
   
   The scss also declared `.testimonials-head`, `.docs-promo-head`, 
`.oss-promo-head`, `.add-left-margin` and `.arch-scale-svg`. `customTheme.scss` 
already declares all of them, and `.add-left-margin` (used by `Benefits.tsx`) 
is the only one that appears in any markup, so nothing loses styling.
   
   ## Verification
   
   - `npx astro build` passes, 36 pages. `dist/img/architecture.png` is 
present, with no `architecture.svg` or stray variants left behind.
   - `website/src/pages/index.tsx` parses clean under esbuild after the import 
removal.
   - `i18n/zh/code.json` is still valid JSON.
   
   The full Docusaurus build was not run locally, so CI is what will confirm 
that half. The change there is a deletion of an unreferenced component.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to