Embed snippets from source code on GitHub using highlight.js and web components. All client side, all free and open source.
<script type='module' src="https://nrktkt.github.io/sauce/sauce.js"></script>
<sauce-code repo='nrktkt/sauce' file='example.html' lines='12:15'
<sauce-code repo='nrktkt/sauce' file='example.html' lines='17:21'
<sauce-code repo='nrktkt/sauce' file='example.html' lines='23:27'
You can find a list of themes here.
The theme name is between the last /
and the .min.css
.
Previews of themes are here.
<sauce-code lang='html' repo='nrktkt/sauce' file='example.html' theme='monokai-sublime' lines='29:33'