.Kind (page): .Type (posts) / .Layout ()
Bundle: n/a (regular page)
[ categories | tags | search ]
ox-hugo Test Site

This is the test site for the ox-hugo package for Emacs/Org-mode.

It is updated automatically after each commit to the ox-hugo repo. It was last updated on Jul 15, 2019 20:01 UTC.

This page was created/modified in commit 5c15470 "Add test for code blocks in list using highlight shortcode" on 2018-05-12.
Markdown source of this page

Indented source block

categories: upstream

tags: src-block indented lists code-fence highlight code-block


Test that indented source blocks, and also the ones in lists export fine.


Some content.

(defun small-shell ()
    (other-window 1)
    (shrink-window (- (window-height) 12))

Code blocks in list using code fences

Reference: hugo Issue #4006

Code blocks in list using highlight shortcode

Reference: hugo Issue #4717, ox-hugo Issue #161

This is an upstream bug in hugo as of 2018-05-12. The issues is that when the code blocks in highlight shortcodes are inserted at the required indentation levels in lists.. so that they get rendered in the list at that indentation level, those indentations are not removed by hugo, and thus become part of those code blocks.

Also, related to this issue, it can be seen that all such indented code blocks have an empty second line too, probably just due to the unremoved indentation on the last line of those code blocks.

In the above section, the same code blocks are code-fenced instead of using highlight shortcode, and the extra indentation is not seen there.

(message "And now I am at level-0 indentation")

Page (Debug)

Page VariableValue
Name "Indented source block"
Title "Indented source block"
ResourceType "page"
Kind "page"
Section "posts"
Draft false
Type "posts"
Layout ""
Permalink "https://ox-hugo.scripter.co/test/posts/source-block-indented/"
RelPermalink "/posts/source-block-indented/"
page.Data{} (type:page.Data)
NextPageIndented equations block
PrevPageInheriting tags
NextInSectionIndented equations block
PrevInSectionInheriting tags

Page Params (Debug)

categories[]string "upstream"
descriptionstring " Test that indented source blocks, and also the ones in lists export\n fine.\n "
draftbool false
iscjklanguagebool false
lastmodtime.Time 2018-05-12 20:29:39 -0400 -0400
tags[]string "src-block" "indented" "lists" "code-fence" "highlight" "code-block"
titlestring "Indented source block"

File Object (Debug)

FileInfo VariableValue
UniqueID "fea1fa81e4c53d84cef5fc4eb01f2b40"
BaseFileName "source-block-indented"
TranslationBaseName "source-block-indented"
Lang "en"
Section "posts"
LogicalName "source-block-indented.md"
Dir "posts/"
Ext "md"
Path "posts/source-block-indented.md"

This site is generated using the ox-hugo package for Emacs/Org-mode + hugo-bare-min-theme + Hugo 0.56.0-DEV (commit 5eb33859, using Chroma commit 26f03cb) .
[Test Site home | ox-hugo home]