.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 27, 2021 01:18 UTC.

This page was created/modified in commit 60b0131 "Fix a failing test due to a change in Org maint upstream" on 2020-09-03.
Markdown source of this page

Indented source block

categories: upstream

tags: indented lists code-fence highlight src-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

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

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 2020-09-03 19:01:39 -0400 -0400
tags[]string "indented" "lists" "code-fence" "highlight" "src-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.68.3 (commit 157669a0) .
[Test Site home | ox-hugo home]