Simple ASCII punctuation characters are substituted with typographic correct ones.

The Typographer provides a similar functionality as the Smartypants project from John Gruber, who also started Markdown.

The concept: Convenient typing options should encourage the use of good typography. (see also → Quote)


Single quotes'Quote'‘Quote’
Angled quotes<<Angle>>«Angle»
Em Dash--- — 
En Dash--

These substitutions can be configured in the markup section for the Goldmark renderer.

More general alternative

There are some reasons not to rely (always) on typographic substitution. They aren’t compelling for every project but may be considerable for yours.

  1. If we want to transform our Markdown content with the help of other rendering software, we may not find a substitution engine working in the same way as Hugo’s typographer.

  2. The substitution of punctuation like the apostrophe is unreliable for rare edge cases, where the correct substitution does not only depend on the place of the quotation mark in the content, but also on its meaning.

The only alternative then, is to write the correct punctuation yourself or to use a Markdown editor capable of transforming straight quotes on the fly like some word processors do.

There are two ways we can write correct punctuation and other special characters directly:

Keyboard Shortcuts
These are key combinations for special characters which depend unfortunately on the operating system and the keyboard layout. On some systems, they are relatively easy to remember. On others, they are very weird and practically useless.
HTML entities
We get the German Gänsefüßchen „ and “  with &bdquo; and &ldquo; for example. Entities look weird in text files, but the result is as good as the original Unicode characters.