A New Page — Hugo Markdown Cheatsheet

This whole page is written in Markdown — no HTML needed — to show the formatting Hugo gives you for free. Everything below is a live example; open this file’s source (content/a-new-page.md) next to the rendered page to see exactly how each part was written. ✨

Text styling

Make text bold, italic, both, or struck through, and use inline code for file names, commands, or formulae like v = √(2GM/r).

Linking to other pages

Adding images

The simplest way is Markdown image syntax — ![alt text](/path/to/image):

Dr Clare Turner

For a caption and tidier layout, use Hugo’s built-in figure shortcode:

Cosmology course certificate

A caption sits under the image, styled by the theme.

Images live in the static/ folder and are addressed from the site root — e.g. static/img/clare-logo.svg is written as /img/clare-logo.svg.

Lists

An unordered list, with nesting:

  • Maths tuition
  • Physics tuition
    • GCSE
    • A-level
    • Undergraduate

A numbered list:

  1. Book a free chat
  2. Agree a plan
  3. Start learning

A checklist (ticked boxes render automatically):

  • Set the website up
  • Add a demo page
  • Choose the final platform

Quotes and rules

“Somewhere, something incredible is waiting to be known.” — Carl Sagan


Tables

LevelSubjectsFormat
GCSEMaths, PhysicsOnline / in person
A-levelMaths, PhysicsOnline / in person
UndergradPhysics topicsOnline

Code

Fenced code blocks preserve spacing and get syntax highlighting:

def escape_velocity(mass, radius):
    G = 6.674e-11                    # gravitational constant
    return (2 * G * mass / radius) ** 0.5

Embedding a video

Clare’s YouTube clips embed with a one-line shortcode — you only need the video’s ID (the bit after watch?v= in its URL):

{{< youtube W3P3rgHVwCg >}}

That renders as a responsive, embedded player right in the page.

Footnotes

Add footnotes for asides or references,1 and they collect neatly at the foot of the page with a link back up.


Note: this site also allows raw HTML inside Markdown, so when you need something Markdown can’t do (a third-party widget, a custom <div>), you can paste that in too — but for almost everything, the tools above are all you’ll reach for.


  1. Like this one — handy for citing a source without breaking your sentence. ↩︎