Step 1:

新增**/layout/partials/Highlight-js.html**

<link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.8/styles/vs2015.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.8/highlight.min.js"></script>
<script>
  hljs.initHighlightingOnLoad();
</script>

Step 2:

在header中加入

{{ partial "Highlight-js.html" }}

其中css的cdn可以換成不同風格的