siegerts / hugo-theme-basic

Basic site theme styled with minimal tachyons, syntax highlighting, and blog series configuration. 📦

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update exampleSite config with correct baseURL format

dtcrout opened this issue · comments

The syntax highlighting is different when running the site in debug mode vs building it.

When running in debug mode, I see:
Screen Shot 2019-06-03 at 9 23 59 PM

When building the site and viewing the generated html, I see:
Screen Shot 2019-06-03 at 9 24 21 PM

Hi @dtcrout!

Is the build being served or just view as a static file? You'll need a server for the highlight.js to load and run. That's what handles the syntax highlight for code snippets.

I tested with hugo serve and hugo serve --debug and I see the expected output.

@siegerts , the contents of the generated public folder is being served via GitHub Pages and that's where I'm seeing the syntax highlighting not working.

Hey!

I looked through your build and it looks like one of the stylesheets (style.css) is timing out, causing the highlight portion to not run.

Add a trailing / to the baseURL var in your config.toml file. Hopefully that will load the asset from the right path.

I'll update the config in the exampleSite.

Thanks @siegerts , that seemed to solve the issue!