uBlogger icon indicating copy to clipboard operation
uBlogger copied to clipboard

fix(prismjs): new configuration parameter + update primjs

Open dezounet opened this issue 3 years ago • 1 comments

Changes

  • Disable/Enable primjs with .Site.Params.Prismjs.Enable
    • Hugo will not load prismjs files (css and js) if this is not enabled
  • Update prismjs version to 1.24.1
  • Remove trailing new line from primjs shortcode

This may address #113, and requires one to add a new section to its config.toml:

[params.prismjs]
  enable = true

Output sample

{{< prism line=true lang="go" >}}
package main
import "fmt"
func main() {
    fmt.Println("hello world")
}
{{< /prism >}}

Gives this:

image

dezounet avatar Jul 03 '21 21:07 dezounet

I was about to open the issue about syntax highlighting, this could fix the problem.

MKastuv avatar Nov 05 '21 01:11 MKastuv