# Vibe-Trading Wiki Static source for `https://vibetrading.wiki`. ## Local preview ```bash cd wiki python3 -m http.server 8088 ``` Open `http://localhost:8088/home/` for the landing page and these wiki sections: - `http://localhost:8088/docs/` - `http://localhost:8088/tutorials/` - `http://localhost:8088/alpha-library/` - `http://localhost:8088/research-lab/` Direct docs URLs such as `/docs/latest/getting-started/vibe-trading-overview` or `/docs/zh/…` are handled by Cloudflare Pages via `_redirects`. The simple Python preview server does not apply those rewrite rules, so use `/docs/` as the local entry point. Build the Alpha Library first (see below) or its zoo links fall through. ## One header, two languages Every page shares one head block, header and footer, kept in `partials/` and copied between `` markers: ```bash python3 wiki/scripts/sync_site_chrome.py # after editing a partial python3 wiki/scripts/sync_site_chrome.py --check # CI ``` The check also requires `
` (it highlights the current section in the header, CSS only), the language attributes below, and one cache-busting `?v=` token everywhere — `_headers` lets browsers keep JS and CSS for an hour, so a module bumped alone can meet a cached copy of what it imports and leave the page blank. Bump the token with one replace across `wiki/`. **Language.** English by default, never guessed from the browser; the header button switches the whole site and the choice is stored (`vibetrading-lang`). `site.js` does the switching: - A page whose URL names no language (``: home, tutorials and research-lab indexes, the Alpha Library and its generated pages, bare `/docs/`) is English HTML with `data-i18n` / `data-i18n-html` / `data-i18n-attr` / `data-href-zh` hooks; Chinese comes from `locales/zh.json`. `theme-init.js` hides such a page until the Chinese text is in, so it never flashes English. - An article exists once per language (`` plus `` both ways): the tutorial (`vibe-trading-beginner.html` / `-zh.html`) and the research post. Opening one records its language; the button goes to the other file. - The docs are one shell: English at `/docs/latest/