So, I just finished adding Travis CI automation to build my site with Hugo and publish it to my account’s Github pages, pointing to that from a custom domain.
I’ve noticed that all my code blocks that worked earlier locally (highlighted via highlight.js) are now plain text and, upon inspecting the generated HTML, do not have any surrounding tags. The code is dumped straight onto the page instead of being wrapped by <pre> or <code> tags.
Any thoughts as to what might have changed? Did I do something wrong with publishing my site? This is my first time to have it not run under hugo server.
My script pulls down the latest commit from Hugo (I think) and builds it. I had previously tested against 0.15-DEV when I was using readdir, but then switched to using 0.14 when I moved from readdir to using content files with front matter instead (so I could use pagination).
So, running the latest 0.15-DEV using hugo server and hugo --theme="grid-side" on my laptop produces the proper pre/code tags. For some reason, my build process on Travis CI results in no pre/code tags. Is there something that I’m missing?
As PygmentsCodeFences = true was added very recently, my best guess wold be that you get a stale/cached version of Hugo on Travis. Try to add a hugo version as a part of your build.
Fixed it. You mentioning PygmentsCodeFences = true reminded me that I had accidentally left that set in my config.toml. Since Travis CI didn’t have Pygments installed, it looks like the code was injected with no wrapping tags. So, totally my mistake. Taking it out produced what I wanted.