arianpg/シンタックスハイライト有効

Created 7 Jan 2020 Modified 11 hours ago

hugoでシンタックスハイライトを有効にする。



config.toml 修正

pygmentsUseClasses = true
pygmentsCodefences = true

シンタックスハイライト用のcss生成

hugo gen chromastyles --style=monokai > site/static/css/syntax.css

headタグ内にcss読み込みを追加

<link rel="stylesheet" href="/css/syntax.css">

Related Issues not found

Please contact @arianpg to initialize the comment