sc0ttj / mdsh

A simple static site generator, using Markdown and Bash
https://sc0ttj.github.io/mdsh/
10 stars 0 forks source link

Add syntax highlighting for code blocks #23

Closed sc0ttj closed 5 years ago

sc0ttj commented 5 years ago

See: https://highlightjs.org/usage/

In the markdown/mdsh:

```LANG
some_command
```

should become

<pre><code class="LANG"> some_command </pre></code>

..where LANG is bash, php, javascript, etc.

(full list: https://highlightjs.readthedocs.io/en/latest/css-classes-reference.html)

sc0ttj commented 5 years ago

Done, but using Pygments at build time, rather than highlight.js at run-time (client-side)...