This website is a port from Gitbook of the Armada Alliance Docs to Docusaurus 2, a modern static website generator.
The website is deployed at Github Pages https://rekuenkdr.github.io/armada-alliance-docusaurus/docs/
nvm use
npm install
npm 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.
All the docs are inside the docs folder .
To add a new one just create an md or mdx file there, please check the markdown features and components that Docusaurus supports.
The sidebar is not automatically generated, in order to add new links or documents to it you have to modify the sidebar.js file .
Check the Docusaurus Docs to learn about this component.
Crowdin is a translation SaaS, offering a free plan for open-source projects.
We recommend the following translation workflow:
- Upload sources to Crowdin (untranslated files)
npm run crowdin:upload
- Use Crowdin to translate the content
- Download translations from Crowdin (localized translation files)
npm run crowdin:download
Crowdin provides a CLI that is installed as dependency to this project, this CLI allows to upload sources and download translations,
The crowdin-v2.yaml
configuration file is convenient for Docusaurus, and permits to download the localized translation files at the expected location (in i18n/[locale]/..
).
Read the official documentation to know more about advanced features and different translation workflows.
This repository uploads the source files and downloads the translations automatically on every deploy to GH-Pages.
For convenience you can use the following command to upload and download:
npm run crowdin:sync
After adding a language in Crowdin UI, you can enable it to make it available on the website adding it to the locales array .
Add the locale to crowdin-v2.yaml exported_languages array too, although it doesn't seem to be taking it into consideration at this moment.
For a deep understanding of the translation workflow please refer to the Docusarus Documentation
Before you can use Crowdin is mandatory to set the environmental variables.
Create a .env file containing this two variables:
CROWDIN_PERSONAL_TOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
CROWDIN_PROJECT_ID=XXXXXX
Replace CROWDIN_PERSONAL_TOKEN value with your own personal token
Do the same with CROWDIN_PROJECT_ID, you can find your project's id at https://crowdin.com/project/<MY_PROJECT_NAME>/settings#api
npm run build
This command generates static content into the build
directory and can be served using any static contents hosting service.
GIT_USER=<Your GitHub username> USE_SSH=true npm run deploy
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the gh-pages
branch.
Don't forget to create the environmental variables for Crowdin as Github secrets or the build will fail.
For automated CI a Github workflow called translate_and_deploy.yml is avaliable inside .github/workflows folder.