Landing page for DCR (Dexoron Cargo Realization):
- tool overview and docs links,
- commands and usage examples,
- install commands for Linux/Windows/macOS,
- language switcher.
The site is static and built from a single HTML template plus JSON translations.
templates/index.tpl.html- shared HTML template.locales/en/index.json- English texts (default locale).locales/ru/index.json- Russian texts.scripts/build-i18n.js- generates pages from locale files.scripts/build-docs.js- generates docs HTML from Markdown.locales/docs.locales.json- docs locales registry (source/output paths and routing).main.js- UI logic, including language switcher.locales/en/docs/**/*.md- English docs source.locales/ru/docs/**/*.md- Russian docs source.locales/en/docs.config.json- English docs UI config (sidebar order, labels).locales/ru/docs.config.json- Russian docs UI config (sidebar order, labels).
npm run i18n:buildOutput:
index.htmlforen(route/)ru/index.htmlforru(route/ru/)
Full build (i18n + styles):
npm run buildDocs-only build:
npm run docs:buildDocs output:
docs/...for English pages (/docs/...)ru/docs/...for Russian pages (/ru/docs/...)
- Create
locales/<lang>/index.jsonusinglocales/en/index.jsonas a template. - Fill all translation keys (the structure must match
locales/en/index.json). - Add the language to
languageOptionsinmain.js. - Set routes:
- default language uses
/, - other languages use
/<lang>/(for example/de/).
- default language uses
- Run
npm run i18n:build.
German example:
- file:
locales/de/index.json - route:
/de/ - output:
de/index.html