Syntax higlighting works only locally

#1

Hey, how do I do syntax highlighting properly? When I run hugo server, it correctly highlights my code (which I have in three backticks) and applies the chosen theme (selected in pygmentsStyle). When I deploy on Netlify, though, the theme is not applied. Is there any intermediate step I should’ve taken to make the theming work also on Netlify and not only locally? The screenshots can be found at imgur dot com slash a/Gkhm1xm.

Relevant piece of my config.toml:

pygmentsCodefences = true
pygmentsUseClasses = false
pygmentsUseClassic = false
pygmentsStyle = "solarized-light"

My hugo.env output:

Hugo Static Site Generator v0.42.1 darwin/amd64
GOOS="darwin"
GOARCH="amd64"
GOVERSION="go1.10.3"

And finally, the code of the blog is here: github, and the netlify site is here Specifically, the code I’m trying to highlight is in content/docs/roguelike-part-0.md.

#2

There are no extra steps with Hugo. You might also check Netlify about this issue. Also, we can’t check if there is some other obvious issue, because we can’t see your site’s code. Please refer to Requesting Help for getting help in the forums.

#3

Sorry, shouldn’t have been so eager. Please see the updated post.

#4

Just linkifying the screenshots for OP as he probably reached his links per post limit: https://m.imgur.com/a/Gkhm1xm

Not that I know of.

The best bet is looking at the browser inspector to understand what CSS actually gets applied on your localhost (hugo server) vs the actual deployment.

#5

I managed to get it fixed by setting the HUGO_VERSION local variable to the latest hugo version. I had something around 0.33, and now have 0.42.