Updating the documentation website
This documentation site is constantly evolving, as new features and products are built. Engineers are expected to write and maintain documentation of their work; but individual files are made more powerful, if they are bundled together. Note that for someone to build this website, they must be using a machine with npm installed; it can be downloaded here.

Download the latest Git build
Compile the application
The Git build contains everything needed to compile a new version of the website. Once the build is downloaded locally onto a machine, only a few steps are needed to create a new build.
Navigate to the correct Directory
Run the build command
As detailed in the [Internal Documentation](/Internal Support/intro) page - we have special pages which are only visible to internal staff.
If you are using a command with the --out-dir value specified, then you need to ensure that a folder already exists with that name - the process cannot create folders that don't exist.
Details
Anonymous
npm run build -- --out-dir build-anon --config docusaurus.config.jsDetails
Authenticated
npm run build -- --out-dir build-auth --config auth.docusaurus.config.jsSometimes, the build command can throw up weird caching issues. In this case, running the command npm run clear will empty the build directory - now, re-running the build command creates a totally clean build.
Checking the output
Once the application has been compiled, it's possible to run it locally by using the npm run serve command. This will let you test the output and see what the site will look like, once it is released on the web. If you've used one of the build commands specified above, you will also need to specify a directory, when you use the serve command:
npm run serve -- --dir build-anon
Deploy 'anon' build
Builds can be published to CloudFlare Pages using the CloudFlare Wrangler command-line interface (requires Node.js be installed to run).
In order to deploy:
- From a command line, navigate to the relevant 'docusaurus' application directory (i.e. the one that contains the 'build' folder)
wrangler whoamiwill show current login status- If not logged in,
wrangler loginwill bring up an interactive login page wrangler pages deploy "%cd%/build-anon" --project-name docs-ghostwill push the files from the 'anonymous' folder, to CloudFlare Pages
Update the Search Indexes
Once pushed, the 'anon' build should be scraped to populate the search bar content. To do this, ask Tom to run the "Goldberg" docker container and then the "Antonelli" docker container.
Deploy 'auth' build
After the anon build has been uploaded and scraped, the searchbar is ready for use. However, the site needs to be re-compiled and deployed with the 'auth' configuration settings turned on, in order for the private documentation to work properly.
In order to deploy:
wrangler pages deploy "%cd%/build-auth" --project-name docs-ghostwill push the files from the 'auth' folder, to CloudFlare Pages
Ready to go
After both sites have been compiled, pushed and scraped, the site is ready to go. Special logic in the auth build will ensure that the correct search bar is presented to users - either the 'customer' searchbar (populated with the product docs), or the 'internal' searchbar (populated with the product docs and the internal docs).