Headings

Syntax

# characters at the start of a line create headings:

## Section
### Subsection
#### Sub-subsection

The title owns the top level

One rule is specific to LibreTimes: the document body never renders a top-level heading. The title you enter when publishing is the page's <h1>; body headings start at the second level.

Start your outline at ##. If a document arrives with # headings (say, imported from elsewhere), it still renders correctly: when any # heading is present, the whole heading tree shifts down one rank, so # becomes ##, ## becomes ###, and so on – the hierarchy is preserved, not flattened.

Heading depth ends at the fourth level. Anything deeper (#####, ######) is clamped to level four, which is also where the editor's toolbar stops. If you need structure deeper than that, the document usually wants splitting rather than deeper nesting.

Anchors

Every heading automatically gets an anchor id derived from its text, and the heading itself is a link to it – hover a heading on any publication and click to copy a deep link. Link to a heading in the same document with a fragment:

See [Escaping](#escaping) below.

The id is the heading text lowercased, with spaces as hyphens and punctuation dropped. Non-Latin headings keep their script (## Введение gets the anchor #введение). Duplicate headings get -1, -2, ... suffixes.

Setext headings

The two-line underline form is valid CommonMark and works, but the # form is the house style:

Section title
=============

An underline of = maps to the top level (and is therefore shifted down like any # heading); - maps to the second level.