nhsuk / nhsuk.service-manual.prototype-kit.docs

NHS Prototype Kit website
https://prototype-kit.service-manual.nhs.uk/
MIT License
3 stars 1 forks source link

Improve syntax highlighting #21

Open frankieroberto opened 4 weeks ago

frankieroberto commented 4 weeks ago

Currently there is syntax highlighting on some pages, for example How to pass data page to page but it’s only working for the HTML examples, not Nunjucks.

The existing implementation uses a pre-compiled version of prism.js along with some CSS.

This is all done client-side though, so wouldn’t work without javascript.

Possibly we should investigate alternative options, such as a server-side processor, or at least update Prism to the latest version?

Prism doesn't list Nunjucks in its supported languages but it does list Jinja2 which might be good enough (as the syntax is very similar)?