Hugo is a popular static site generator written in the Go programming language. Hugo is jam-packed with features, but one of its main selling points is speed — Hugo takes mere seconds to generate a site with thousands of pages. Smashing Magazine recently switched to Hugo from WordPress.
Hugo has excellent Markdown support out of the box. By default, Hugo uses the Blackfriday Markdown processor. See the configuration instructions to learn more about the extensions you can configure. You can change Hugo’s Blackfriday settings in the config.toml
file, as shown below.
baseURL = "http://mysite.org/"
languageCode = "en-us"
title = "My Site"
theme = "ananke"
[blackfriday]
taskLists = false
Hugo provides support for the following Markdown elements. By default, Hugo uses the Blackfriday Markdown processor.
Element | Support | Notes |
---|---|---|
Headings | Yes | |
Paragraphs | Yes | |
Line Breaks | Yes | |
Bold | Yes | |
Italic | Yes | By default, using asterisks and underscores in the middle of a word doesn't work you way expect (e.g., in*middle*here and in_middle_here are rendered literally). You can disable the noIntraEmphasis extension to restore the conventional Markdown functionality. |
Blockquotes | Yes | |
Ordered Lists | Yes | |
Unordered Lists | Yes | |
Code | Yes | |
Horizontal Rules | Yes | |
Links | Yes | |
Images | Yes | |
Tables | Yes | Enabled by default. |
Fenced Code Blocks | Yes | Enabled by default. Syntax highlighting is also supported. |
Footnotes | Yes | Enabled by default. |
Heading IDs | Yes | Enabled by default. |
Definition Lists | Yes | Enabled by default. |
Strikethrough | Yes | Enabled by default. |
Task Lists | Yes | Enabled by default. |
Automatic URL Linking | Yes | Enabled by default. |
Disabling Automatic URL Linking | Yes | |
HTML | Yes | Enabled by default. |
As an added bonus, Hugo provides support for several obscure elements. These are disabled by default, but you can enable them in the config.toml
file.
Element | Markdown | Rendered Output |
---|---|---|
Emoji | :joy: |
😂 |
Don't stop now! 😎 Drop in to the Slack chat room and star the GitHub repository. If you liked this and want to receive new Markdown tutorials, enter your email address below. No spam!