Org Source Block
tags: src-block
Description/Summary
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: pygmentsCodeFences = true is set in the Hugo site config.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), and org-hugo-langs-no-descr-in-code-fences is set to a value not containing that lanaguage descriptor (org in this case).
Content
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:
pygmentsCodeFences = true
is 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
), and org-hugo-langs-no-descr-in-code-fences
is set to a value not containing that lanaguage descriptor (org
in 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.
Page (Debug)
Page Variable | Value | |
---|---|---|
Name | "Org Source Block" | |
Title | "Org Source Block" | |
ResourceType | "page" | |
Kind | "page" | |
Section | "posts" | |
Draft | false | |
Type | "posts" | |
Layout | "" | |
Permalink | "https://hugo-sandbox.netlify.com/posts/org-source-block/" | |
RelPermalink | "/posts/org-source-block/" | |
Data |
| |
NextPage | Org Babel Results | |
PrevPage | Overriding Org-style tags | |
NextInSection | Org Babel Results | |
PrevInSection | Overriding Org-style tags |
Page Params (Debug)
maps.Params{"draft":false, "iscjklanguage":false, "lastmod":time.Date(2017, time.November, 2, 10, 12, 52, 0, time.Location("")), "tags":[]string{"src-block"}, "title":"Org Source Block"} (type:maps.Params) |
File Object (Debug)
FileInfo Variable | Value |
---|---|
UniqueID | "e184db746cfebd17c54ef3f595cbec90" |
BaseFileName | "org-source-block" |
TranslationBaseName | "org-source-block" |
Lang | "en" |
Section | "posts" |
LogicalName | "org-source-block.md" |
Dir | "posts/" |
Ext | "md" |
Path | "posts/org-source-block.md" |