This website is built using Docusaurus 3, a modern static website generator.
All the images must be placed in /static/img
Inside this folder, all the images are sorted into subfolder according to the docs structure they are called into.
For example, an image used into docs/elioblocs/blocs/conditions.md is going into static/img/elioblocs/blocs/conditions
There is two exceptions with commonly used images files :
- Logos goes in the
logosfolder - All other images than logos, but still commonly used goes in
commonfolder
$ npm install
$ npm run start
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
$ npm run build
This command generates static content into the build directory and can be served using any static contents hosting service.
$ npm run serve
⚠️ Warning⚠️
Any push to themainbranch will be deployed, be careful to double-check before doing any change to themainbranch.
To deploy to https://docs.eliobot.com just push into the main branch, the project will be automatically be built and deploy with github actions.
This project is configured with Docusaurus i18n.
To add a new locale (example: es), follow this workflow.
Update the i18n.locales array:
i18n: {
defaultLocale: 'fr',
locales: ['fr', 'en', 'es'],
},npm run write-translations -- --locale esThis creates:
i18n/es/code.jsoni18n/es/docusaurus-theme-classic/navbar.jsoni18n/es/docusaurus-theme-classic/footer.jsoni18n/es/docusaurus-plugin-content-docs/current.json
Copy docs into the locale folder:
mkdir -p i18n/es/docusaurus-plugin-content-docs/current
rsync -a --delete docs/ i18n/es/docusaurus-plugin-content-docs/current/Then translate markdown files in:
i18n/es/docusaurus-plugin-content-docs/current/**/*.md
Translate messages in:
i18n/es/docusaurus-theme-classic/navbar.jsoni18n/es/docusaurus-theme-classic/footer.jsoni18n/es/docusaurus-plugin-content-docs/current.json
Homepage strings are in React components and use Docusaurus Translate/translate:
src/pages/index.jssrc/components/HomepageFeatures/index.js
Add translated values for those ids in:
i18n/es/code.json
- Keep MDX/JSX tags unchanged (
<Jump ...>,<img ...>,import ...). - In localized docs, image links should use
/img/...(not relative../../static/img/...), otherwise builds can fail. - Keep frontmatter structure intact.
npm run buildCheck that all locales are built (example):
build/(fr)build/en/build/es/
write-translationserror with duplicate sidebar keys: add a uniquekeyfor duplicate categories insidebars.js.- Broken markdown images in localized docs:
replace relative
.../static/img/...paths with/img/.... - Translated MDX tags (example
<Jump>changed by machine translation): restore original tag/component names manually.