.Kind (home): .Type (page) / .Layout ()
Bundle: branch
[ categories | projects | tags | search ]
Hugo Sandbox

This is an unofficial Hugo sandbox site to try to replicate possible bugs in hugo.

It is updated automatically after each commit to the hugo-sandbox repo. It was last updated on Oct 09, 2018 14:48 UTC.


This page was created/modified in commit cf4db09 "Add image credit, caption and creator in front-matter" on 2018-03-21.
Markdown source of this page

Featured/Header Image

Generated in emacs (Credit: meme.el)
KeyTypeValue
captionstring "Generated in emacs"
creditstring "meme.el"
sizeint64 600
urlstring "https://github.com/larsmagne/meme"

Content

content/
 - _index.md
 - homebranchbundle-featured.png
Kind Description Example
home The home page /index.html
page A page showing a regular page my-post page (/posts/my-post/index.html)
section A page listing regular pages from a given section posts section (/posts/index.html)
taxonomy A page listing regular pages from a given taxonomy term page for the term awesome from tags taxonomy (/tags/awesome/index.html)
taxonomyTerm A page listing terms from a given taxonomy page for the tags taxonomy (/tags/index.html)


Resources

Use Org Code markup for kbd tag (default behavior)

(Last modified on Thu Nov 2, 2017)

This is the default behavior. So ~C-h f~ will show up as `C-h f` and then <code>C-h f</code> in the final Hugo generated HTML. Example: Few of Emacs help keybindings: C-h f, C-h v

Use Org Code markup for kbd tag

(Last modified on Thu Nov 2, 2017)

Here the Org code markup is explicitly specified to be used for <kbd> tag generation by setting EXPORT_HUGO_USE_CODE_FOR_KBD property to t. So ~C-h f~ will show up as <kbd>C-h f</kbd>. Example: Few of Emacs help keybindings: C-h f, C-h v

Source blocks with highlight shortcode

(Last modified on Thu Nov 2, 2017)

Note that to disable the code fence option, the value portion of the property needs to be left empty instead of setting to nil! :PROPERTIES: :EXPORT_HUGO_CODE_FENCE: :END: Here are few variables that you might like to change in the local.mk: prefix: Org installation directory prefix = /dir/where/you/want/to/install/org # Default: /usr/share The .el files will go to $(prefix)/emacs/site-lisp/org by default. If you’d like to change that, you can tweak the lispdir variable.

Nested lists

(Last modified on Thu Nov 2, 2017)

foo1 foo2 bar1 bar2 baz1 baz2 zoo1 zoo2 numbered1 numbered2

List following a list

(Last modified on Thu Nov 2, 2017)

You need to force end of list when you have something like an unordered list immediately following an ordered list. The easiest and cleanest way to do that is adding a comment between those lists. – Reference That would be the implementing in the Org exporter backend. But in Org, two consecutive blank lines after a list ends the list. In the below example, the foo* items would be in a different <ul> element than the bar* items.

Inline equations

(Last modified on Thu Nov 2, 2017)

Inline equations are wrapped between \( and \). $ wrapping also works, but it is not preferred as it comes with restrictions like “there should be no whitespace between the equation and the $ delimiters”. So $ a=b $ will not work (it will look like: $ a=b $), but $a=b$ will work (it will look like: \(a=b\)). On the other hand, both \(a=b\) (it will look like: \(a=b\)) and \( a=b \) (it will look like: \( a=b \)) will work.

General

(Last modified on Thu Nov 2, 2017)

Below table shows the translation of Org markup to Markdown markup in the exported .md files. Org Markdown In Hugo rendered HTML *bold* **bold** bold /italics/ _italics_ italics =monospace= `monospace` monospace ~key-binding~ `key-binding` key-binding - if org-hugo-use-code-for-kbd is nil [default] ~key-binding~ <kbd>key-binding</kbd> - if org-hugo-use-code-for-kbd is non-nil - Requires CSS to render the <kbd> tag as something special.

Don't Use Org Code markup for kbd tag

(Last modified on Thu Nov 2, 2017)

Note that to disable the “use code for kbd” option, the value portion of the property needs to be left empty instead of setting to nil! :PROPERTIES: :EXPORT_HUGO_USE_CODE_FOR_KBD: :END: Here ~C-h f~ will show up as `C-h f` in Markdown and then <code>C-h f</code> in the final Hugo generated HTML. Example: Few of Emacs help keybindings: C-h f, C-h v

Code-fenced source blocks (default behavior)

(Last modified on Thu Nov 2, 2017)

The source blocks are code-fenced by default. Here are few variables that you might like to change in the local.mk: prefix: Org installation directory prefix = /dir/where/you/want/to/install/org # Default: /usr/share The .el files will go to $(prefix)/emacs/site-lisp/org by default. If you’d like to change that, you can tweak the lispdir variable. infodir: Org Info installation directory. I like to keep the Info file for development version of Org in a separate directory.

Source block without list syntax in a list

(Last modified on Thu Nov 2, 2017)

This case is not affected by Blackfriday Issue #239 as the fenced code block does not have Markdown syntax lists. List item 1 *abc*/def/=def= List item 2


This site is generated using the ox-hugo package for Emacs/Org-mode + hugo-bare-min-theme + Hugo 0.50-DEV (commit d5d50e2f, using Chroma commit d5ca12b) .

[Back to Hugo Sandbox home]