Markdown

Colophon - How this Site is Made

Hugo logo
This site is written in Markdown and generated with the static site generator (SSG) Hugo. Markdown is a simple plain text document format that can be easily and quickly processed to generate html, pdf, .docx, and a number of other file formats. I use it for just about all my writing - for documents and articles (I avoid Microsoft Word at all costs!), note taking, and for writing web pages. Hugo quickly generates an efficient website. Since the website is made up only of static webpages and a little JavaScript, it renders fast.

I started with the Mainroad theme, and gradually added customizations and extensions. (I spend way too much time fretting about formatting and not nearly enough time actually writing content - And the results are pretty mediocre in any case!)

Hugo Markdown Image Handling

Hugo Markdown Image Handling

This article is under construction

The article discusses the details of how Goldmark Markdown and Hugo handles images, along with how to add attributes such a positioning and sizing when using images in a Hugo Markdown file.

Markdown Formatting

Introduction

Many Flavours of Markdown

There are many variants of Markdown formats, and each processor may support a range of extensions, and interpret the Markdown specifications in somwhat different ways. The main formats include:

Markdown Processors

There are also many different Markdown processors, each with their own quirks. See the section [Other Markdown Processors and Formats] for details.

Hugo's Markdown Extensions

Introduction

This article focuses on markdown as supported by Hugo and Pandoc. Here are a few good Markdown references and tutorials:

Hugo’s Markdown

Hugo uses the GoldMark as it’s default Markdown processor. Goldmark supports the CommonMark standard, along with:

Hugo Goldmark also supports:

Pandoc’s Markdown

See Pandoc’s Markdown for details.

Using ASCIIMath and MathJax

This page tests and documents using MathJax, Latex and AsciiMath with Hugo and markdown.

Getting a Markdown Processor to Ignore Markup

MathJax, AsciiMath, and similar processors use special markup characters in the the html file. Often these characters overlap with markdown’s markup, and the markdown processor will mess things up. There are a number of options:

  • Use the \ backslash, which is markdown’s escape character, to escape characters that would be processed by markdown. See Escaping Characters in markdown

  • Create a simple hugo shortcode which does nothing but pass through text verbatim, bypassing the markdown processor. Here’s an example of AsciiMath using the in (for inline) shortcode: