Unexpected styling of GitLab Snippet with PaperMod theme

In my website, I created a shortcode for embedding GitLab Snippets as follows:

<script src="https://gitlab.com/-/snippets/{{ index .Params 0 }}.js"></script>

Then I used the shortcode in the page with

{{< glsnip 2368218 >}}

, but the snippet shows weird colors etc.

instead of something like this

What do I have to do to achieve the normal behaviour?

Hugo uses Chroma for syntax highlighting.

The PaperMod theme uses highlight.js for syntax highlighting instead of Chroma.

The theme provides an option to disable highlight.js in site configuration:

    disableHLJS: true

Although this disables loading of the relevant JS files, there are still artifacts of highlight.js in the CSS. See:

I suggest you raise a question with the theme author.


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.