Skip to content
This repository was archived by the owner on Dec 20, 2021. It is now read-only.

Conversation

@dezounet
Copy link

@dezounet dezounet commented Jul 3, 2021

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

Disable/Enable primjs with `.Site.Params.Prismjs.Enable`
Update prismjs version to 1.24.1
Remove trailing new line from primjs shortcode
@dezounet dezounet changed the title fix(primjs): new configuration parameter + update primjs fix(prismjs): new configuration parameter + update primjs Jul 4, 2021
@MKastuv
Copy link

MKastuv commented Nov 5, 2021

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants