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

fix(prismjs): new configuration parameter + update primjs#124

Open
dezounet wants to merge 1 commit into
uPagge:masterfrom
dezounet:prismjs-highlight-fix
Open

fix(prismjs): new configuration parameter + update primjs#124
dezounet wants to merge 1 commit into
uPagge:masterfrom
dezounet:prismjs-highlight-fix

Conversation

@dezounet

@dezounet dezounet commented Jul 3, 2021

Copy link
Copy Markdown

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

MKastuv commented Nov 5, 2021

Copy link
Copy Markdown

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