This repository contains the Tributech Platform documentation. This documentation is written in markdown syntax using docusaurus hosted on Github Pages.
Git LFS is not supported with Github Pages: git-lfs/git-lfs#3498
Install NodeJS on Windows or WSL, e.g. WSL:
## Install NodeJS on WSL
# install curl
$ sudo apt-get install curl
# install nvm
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
# restart console
# check if nvm is installed
$ nvm --version
# install Node.js max LTS version < v18 (because of the Webpack crypto.createHash() function)
$ nvm install 23.0.0
```nvm install
## Installation
```console
yarn
yarn startThis command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
yarn clear
This command clears the local cache in case References / Images are not reflected in the yarn start
yarn buildThis command generates static content into the build directory and can be served using any static contents hosting service.
The master branch get automatically deployed using Github-Actions.
To update a specific version of the documentation just edit the files in the correct folder and merge to master using a PR.
By default, Docusaurus uses a /docs folder to store the "latest version" of the documentation, which appears in the version dropdown menu.
However, in this setup, only numbered versions should be visible in the dropdown, so the /docs folder has been deleted.
To release a new version with Docusaurus using the command yarn run docusaurus docs:version [X.X.X], follow these steps:
- Copy the latest version from versioned_docs into a newly created
/docsfolder at the root of the repository. - Run the versioning command mentioned above to create the new version.
- After releasing the new version, you can delete the
/docsfolder again. - Make any necessary changes for the new release in the corresponding folder inside
/versioned_docs.
Previously, the navbar was configured globally in docusaurus.config.js. Now, since different versions (e.g., v5.0.0 vs. earlier versions) require different navbar items, the navbar has been customized using a swizzled theme component.
- Global navbar items (shared across all versions) should still be added to
docusaurus.config.jsunderthemeConfig.navbar.items. - Version-specific or custom navbar items should be added directly in the React component at
src/theme/Navbar/Content/index.js.
To add a custom navbar item for a specific version:
- Open
src/theme/Navbar/Content/index.js. - Use the
activeVersionvariable to conditionally render your custom<Link>or navbar item for the desired version. - Example:
{activeVersion?.name === '5.0.0' && ( <Link className="navbar__item navbar__link" to="/tributech_c_sdk/overview"> Tributech C-SDK </Link> )}
- For items that should appear in multiple versions, adjust the condition accordingly.
Note: Global items remain in the config; version-specific items are handled in the swizzled component.