Maintaining
Documentation site
Section titled “Documentation site”The site is an Astro/Starlight project in docs/. It needs:
- Node.js 24 or newer;
- Emscripten, for the WebAssembly UI simulator;
- Doxygen, for the C API reference.
cd docsnpm cinpm run build # copy-vendor + wasm + Doxygen + Astronpm run check # internal links and generated APInpm run previewLocal development:
npm run devThe predev and prebuild steps run copy-vendor, then build the simulator, then build the API.
The generated public/mermaid.min.js, public/ui/ and public/api/ are not tracked by git.
Skipping the heavy steps
Section titled “Skipping the heavy steps”To edit Markdown without Emscripten or Doxygen, keep an existing build and skip the generators:
CARDSIGHT_SKIP_WASM=1 CARDSIGHT_SKIP_API=1 npm run buildBoth steps still require the corresponding public/ui/ or public/api/ directory from a previous
full build. The first build must run without the skip variables.
Emscripten
Section titled “Emscripten”git clone https://github.com/emscripten-core/emsdk.git ~/emsdk~/emsdk/emsdk install latest~/emsdk/emsdk activate latestsource ~/emsdk/emsdk_env.shThe simulator sources are in software/tests/wasm/; it compiles the real UI from
software/apps/cardsight/ui/, fonts and assets, and writes cardsight-ui.js and
cardsight-ui.wasm to docs/public/ui/. The CMake project is independent of the firmware build.
Doxygen
Section titled “Doxygen”Install doxygen with the system package manager. npm run api reads docs/Doxyfile, writes the
HTML to docs/public/api/html/, and creates docs/public/api/index.html as a small redirect.
The input is the public headers only; private headers are excluded.
Screenshots
Section titled “Screenshots”The screenshots in docs/src/assets/ are rendered from the firmware UI, not photographed from the
panel:
cd softwarecmake --preset host && cmake --build build/host --target ui_sim./build/host/tests/host/ui_sim # writes /tmp/ui-*.ppmThe PPM output is RGB888 at 240×284. The committed PNGs are 2× nearest-neighbour enlargements, created with Pillow as a one-off local tool:
from PIL import ImageImage.open('/tmp/ui-direct.ppm').resize((480, 568), Image.NEAREST).save( 'docs/src/assets/cardsight-ui.png', optimize=True)Regenerate them when the UI changes.
Publishing
Section titled “Publishing”docs.yml builds the site on master and deploys it to GitHub Pages:
https://yuzukihd.github.io/CardSight/
Pages is enabled for the repository with Source: GitHub Actions. The workflow runs on changes
under docs/, the application UI, the wasm sources, the public headers, the standard project files
and the workflow itself. ci.yml builds the same artifacts on non-master branches and pull requests
without deploying.
Source release
Section titled “Source release”./software/scripts/release.sh 0.1.0The tarball contains the licenses, README, standard project files and both font notices. It excludes
build output, *.a, *.o, *.d, the docs build products and the vendored mermaid copy. The
SyterKit submodule is replaced by a SOURCE.txt pointer.
Submodule pointers
Section titled “Submodule pointers”Third-party submodules must point at commits that exist in their public repositories. SyterKit must
contain boards/yuzuki-cardsight/. Check before moving a pointer:
git submodule statusgit ls-remote https://github.com/YuzukiHD/SyterKit.gitDocumentation rules
Section titled “Documentation rules”- English only; one source of truth per topic.
- Quoted
titleand a one-sentencedescriptionin every page frontmatter. - Lowercase kebab-case filenames; the slug is the path under
src/content/docs/. - Internal links use relative
.mdpaths; the remark plugin rewrites them. Do not hard-code/CardSight/...in content. - Moved pages get an entry in the
redirectsmap indocs/astro.config.mjs. - Destructive or hazardous instructions use a Starlight caution aside.
- Code blocks use
sh,text,corcmakefences; interactive sessions show thecardsight>prompt. - Do not copy command or configuration tables between pages; link to the canonical reference.