ripple / dactyl

Tools to make enterprise documentation from Markdown sources.
MIT License
69 stars 34 forks source link

Code highlighting at build time #51

Closed mDuo13 closed 3 years ago

mDuo13 commented 4 years ago

Existing Dactyl sites use a JavaScript solution like highlight.js to provide syntax highlighting for code blocks. This runs in the browser, which means more to download and more to run on the client side, on every page view. For everything except API tools, syntax highlighting only has to be done once, at compile time.

The CodeHilite extension, which comes with Python-Markdown, can do this as part of the Markdown-parsing build step.

Then sites just need the appropriate CSS, with option to customize.

mDuo13 commented 3 years ago

Done in https://github.com/ripple/dactyl/releases/tag/v0.13.0