beeminder / blog

3 stars 2 forks source link

Use HighlightJS for code blocks #356

Open dreeves opened 1 year ago

dreeves commented 1 year ago
### Desiderata
- [ ] Get list of posts with pre tags that are uglily overflowing
- [ ] Do the same for posts with code tags
- [ ] Add HighlightJS

highlightjs.org for better code blocks. the following posts with pre tags are a bit ugly right now and there may be others with code tags:

https://blog.beeminder.com/ratchet https://blog.beeminder.com/isolines https://blog.beeminder.com/gmailzeroer

Cognata

Verbata: code formatting, code blocks, monospacing, fixed width, syntax highlighting,

narthur commented 1 year ago

Marked plugin for this:

https://www.npmjs.com/package/marked-highlight

narthur commented 1 year ago

@dreeves Turns out adding HighlightJS wasn't as straightforward as I'd imagined. With PR #406 code blocks now have basic styling. Is this sufficient, or do we still want to get proper highlightjs-style code highlighting?

https://blog.beeminder.com/isolines