From Org-mode marukup to Markdown

2019-04-05 115 words 1 min read

Here are how ox-hugo convert markups (like bold, mono) in Org to Markdown.

Table: 1: From Org-mode to Markdown
Org Markdown HTML
*bold* **bold** bold
/italics/ _italics_ italics
=monospace= `monospace` monospace
~key-binding~ `key-binding` key-binding
- if org-hugo-use-code-for-kbd nil [Default]
~key-binding~ <kbd>key-binding</kbd>
- if org-hugo-use-code-for-kbd is not nil
- To render <kbd> tag, needs CSS
+strike-through+ ~~strike-through~~ strike-through
_underline_ <span class = "underline">underline</span> underline
- to render this as underline, CSS is needed

I have set org-hugo-use-code-for-kbd to t :

Code Snippet 1: Use <kbd> for key-binding (emacs-lisp)
(setq org-hugo-use-code-for-kbd t)

And add CSS styles like this:

kbd {
    padding: 0.2rem 0.4rem;
    font-size: 87.5%;
    color: #fff;
    background-color: #212529;
    border-radius: 0.2rem;

    text-decoration: underline;

Tags: Hugo ox-hugo

Related Articles:

We notice you're using an adblocker. If you like our webite please keep us running by whitelisting this site in your ad blocker. We’re serving quality, related ads only. Thank you!

I've whitelisted your website.

Not now
This website uses cookies to ensure you get the best experience on our website. Learn more Got it