modular-diffusion icon indicating copy to clipboard operation
modular-diffusion copied to clipboard

Improve syntax highlighting in docs

Open cabralpinto opened this issue 1 year ago • 2 comments

Currently, we're using default Astro settings (Shiki with the github-dark theme). However, the syntax highlighting is clearly lacking, with many words not being highlighted. Useful link.

cabralpinto avatar Aug 28 '23 13:08 cabralpinto

Hi @cabralpinto, How about we use https://www.mkdocs.org/ or https://www.sphinx-doc.org/en/master/ as the document system, both provide plenty of themes. For example, https://squidfunk.github.io/mkdocs-material/, https://sphinx-themes.org/. They also can integrate the docstring of code into the document directly. We do not need to bother with boilerplate code for html/css/js. MD/RST is enought to generate great docs. Moreover, we can customize the documentation using these document systems.

cauliyang avatar Sep 03 '23 01:09 cauliyang

Hi @cauliyang, thank you for your suggestion! However, the whole documentation site has already been built using Astro and I believe rebuilding it with a different system wouldn't be very productive :). So far the site works well and takes advantage of Astro's builtin markdown support, so that's not an issue either. I also appreciate that I could customize it to my liking, which is harder with preset themes. The only thing I'd like to change is how most of the words in the code don't get proper highlighting, which I believe can be done by just reconfiguring the Astro syntax highlighting options.

cabralpinto avatar Sep 03 '23 14:09 cabralpinto