Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tools: Rucio-Processor for markdown allows dark mode tables
The pipeline for the creation of the rucio-docs for the client API is as follows: * begin process using `build_documentation.sh` * `generate_dynamic_files.sh` spins up a docker container * inside of the docker container, `generate_docs.sh` is called * which in turn calls `generate_client_api_docs.sh` * `generate_client_api_docs.sh` parses the files in `lib/rucio/client` and converts them using `pydoc-markdown`. * `pydoc-markdown` uses `rucio_processor.py` and `rucio_renderer.py` (both in `tools/run_in_docker`, which is mounted into the docker container). * "auto_generated" output markdown files' ownerships are changed * compiling this markdown into html -> completed using docusaurus as part of the github action The final stage adds styling (i.e. CSS) to the compiled markdown files. This means that in general, a dark mode can be applied. However, some components in the client api are formatted in pre-styled HTML tables (within the markdown!), these styles are never overridden. As discussed with @bari12, a simple fix to the missing dark mode is proposed here. Instead of reworking the markdown to use plain markdown-tables which are styled at the appropriate (docusaurus) step (and not HTML tables that come with their own style), we reference a docusaurus CSS variable `--ifm-background-color`, which will set the correct dark mode colour (depending on whether dark or light mode is requested). We are aware of the fact that in doing so, we reference a variable several steps before it is defined. In addition, we add even more complicated HTML/CSS syntax to markdown, which is supposed to be easy on human eyes. The benefit of this fix is that it is minimally-invasive, and that the markdown files are never supposed to be served by themselves and only act as a middle step for the entire pipeline.
- Loading branch information