Files
oh-my-posh/website
Jan De DobbeleerandJan De Dobbeleer 79698031f6 feat(config): leave the segment implementations out of the browser build
The studio renders a config from recorded data. It has no filesystem, no
processes and no network, so every segment's detection finds nothing the
moment it runs - and yet all 118 implementations were linked into the
module, because a package-level map holds a constructor for each and an
init gob-registers them all. Both are reachable from any config parse,
so between them they pinned every segment package and everything those
pull in: cloud SDKs, HTTP clients, the lot. 4.2MB raw, 0.5MB brotli, for
code no visitor can reach.

The registry moves behind a build tag. The browser build constructs no
writer at all and renders from the recorded data instead, which carries
what a template reads - fields and method results alike. Seven places
assumed a writer exists; they now ask whether there is one, and the
rendered text has somewhere to live when there is not.

The website's own data file moves to the recorded envelope format, which
is what carries a segment's enabled state when there is no writer left
to ask.

Combined with the HTTP stack already gone from this build: 29,351,525
bytes to 21,857,604 raw, 4,675,591 to 3,640,973 brotli - 22% off what a
visitor downloads.

Entire-Checkpoint: da3ad3698634
2026-07-30 19:44:41 +02:00
..

Website

This website is built using Docusaurus, a modern static website generator.

Installation

npm install

Local Development

npm run start

This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.