In my website, I created a shortcode for embedding GitLab Snippets as follows:
layouts/shortcodes/glsnip.html
<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:
params:
assets:
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.
2 Likes
system
Closed
3
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.