This repo contains the sources and scripts to build the Celerity website (https://celerity.github.io) using Docusaurus.
The whole process is complicated slightly by building the API docs from the celerity runtime sources, which is accomplished with 🥬doc, and integrated into the generated website by scripts/import_api_docs.js.
- Clone this repository Use --recursive to get the celerity-runtimesubmodule.
- Update the celerity-runtimesubmodule to the tagged version you want to build docs for.
- Build the API docs:
- Run CMake for celerity-runtime, with AdaptiveCPP as the SYCL implementation (there is some specific handling for that in the doc generation script). This is necessary to generate the compile_commands.jsonfile used by 🥬doc. E.g.cd celerity-runtime mkdir build cd build cmake .. -G Ninja .. -DCMAKE_PREFIX_PATH="[path to AdaptiveCpp]" -DACPP_TARGETS="cuda:sm_52" -DCMAKE_BUILD_TYPE=Release 
- link the generated compile_commands.jsoninto the root of this repository (or copy it).cd .. ln -s build/compile_commands.json compile_commands.json
- Adjust the 🥬doc configuration, by editing the .hdoc.tomlfile in the root of the celerity-runtime directory.- Make sure the git_default_branchis set to the branch/tag you are building the docs for.
- If you changed the name or location of the compile_commands.jsonfile, adjust that too.
 
- Make sure the 
- Run 🥬doc -- configuration is supplied in the .hdoc.tomlfile, and should need no changes:[path to leafy-green-doc]/build/hdoc 
- Run the import script to generate the docusaurus docs from the 🥬doc output:
cd .. node scripts/import_api_docs.js
 
- Run CMake for celerity-runtime, with AdaptiveCPP as the SYCL implementation (there is some specific handling for that in the doc generation script). This is necessary to generate the 
- Install dependencies:
npm install 
- Run docusaurus to build and interactively test the website:
npm start 
- If everything looks good, build and publish the website:
npm run build npm run deploy