NanoFile

Blog post example

What a post looks like for Hugo, Astro, Jekyll or Eleventy: metadata at the top between three dashes, then the article.

blog-post.md
---
title: Why your line break did nothing
description: The most common markdown surprise, and the three ways around it.
date: 2026-08-27
tags:
  - markdown
  - writing
draft: false
---

# Why your line break did nothing

You pressed Enter. The rendered page ignored you. This is not a bug, and once
you know the rule it stops happening.

## The rule

A single newline is whitespace. Markdown joins the lines either side of it into
one paragraph, exactly as HTML does.

> Markdown is not a text editor. It is a way of writing structure in plain text,
> and structure has no concept of "here I pressed Enter".

## The three ways around it

1. Two spaces at the end of the line.
2. A backslash at the end of the line.
3. A blank line, which starts a new paragraph.

The second is the one to use, because it survives editors that strip trailing
whitespace on save.

![A diff showing two invisible trailing spaces](trailing-spaces.png)

## Further reading

- [Line breaks](https://nanofile.app/en/markdown-line-break)
- [The full cheat sheet](https://nanofile.app/en/cheatsheet)

title: Why your line break did nothing description: The most common markdown surprise, and the three ways around it. date: 2026-08-27 tags: - markdown - writing draft: false

Why your line break did nothing

You pressed Enter. The rendered page ignored you. This is not a bug, and once you know the rule it stops happening.

The rule

A single newline is whitespace. Markdown joins the lines either side of it into one paragraph, exactly as HTML does.

Markdown is not a text editor. It is a way of writing structure in plain text, and structure has no concept of "here I pressed Enter".

The three ways around it

  1. Two spaces at the end of the line.
  2. A backslash at the end of the line.
  3. A blank line, which starts a new paragraph.

The second is the one to use, because it survives editors that strip trailing whitespace on save.

A diff showing two invisible trailing spaces

Further reading

What this example uses