Hello
I built a site using the hyde-hyde theme. The theme used highlight.js
. I would like to try the build in hugo highlight facilities. Thus I put the following in my config files:
# source code highlihting
pygmentsUseClassic = false
pygmentsCodeFences = true
pygmentsCodeFencesGuessSyntax = true
pygmentsOptions = "linenos=5"
pygmentsStyle = "monokai"
# https://highlightjs.org
highlightjs = false
# highlightjsstyle = "github"
Then I use markdown file with block such as:
print(f"Numpy: {np.__version__}")
print(f"Scipy: {sp.__version__}")
print(f"Pandas: {pd.__version__}")
print(f"Seaborn: {sns.__version__}")
But at the end the html page is the following without source code highlight:
<pre><code class="language-python">print(f"Numpy: {np.__version__}")
print(f"Scipy: {sp.__version__}")
print(f"Pandas: {pd.__version__}")
print(f"Seaborn: {sns.__version__}")
</code></pre>
I guess I miss something but reading this page of the doc does not help: https://gohugo.io/content-management/syntax-highlighting/
EDIT it works if I put this in markdown files:
{{< highlight python >}}
print(f"Numpy: {np.__version__}")
print(f"Scipy: {sp.__version__}")
print(f"Pandas: {pd.__version__}")
print(f"Seaborn: {sns.__version__}")
{{< / highlight >}}
Thank you