You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.4 KiB
1.4 KiB
+++ title = "Org Source Block via Pygments" tags = ["src-block", "pygments"] draft = false +++
This test case is not important after Hugo 0.28 as this was a workaround for a limitation in the Pygments syntax highlighter. Hugo 0.28 onwards, the default syntax highlighter is Chroma, which does not have that limitation, and thus no need for this workaround.
Test case for the case where user has set
org-hugo-langs-no-descr-in-code-fences to a list containing the
element org.
As this variable is dependent on user's config, this post is not set to be exported by default.
The issue with Hugo will be seen if all of the below are true:
pygmentsCodeFences = trueandpygmentsUseClassic = true(Hugo ≥ 0.28 -- default value isfalse) are set in the Hugo siteconfig.toml.- A source block's language is set to one that's not supported by
Pygments (like org, and thus the below example with source code
language set to
org). org-hugo-langs-no-descr-in-code-fencesis set to a value not containing that language descriptor (orgin this case).
# Org comment
Export this post after setting
=org-hugo-langs-no-descr-in-code-fences= to =(org)= and temporarily
removing the =noexport= tag.