Link to a random paragraph/line anchor in one markdown page

I want to be able to link to specific paragraphs (or lines) inside a page (markdown file).

In obsidian, you can use the mark ^, for example:

My paragraph here  ^anchor

And you link to specific syntax by the Obsidian wiki-link [[File.md#anchor]]. In mdbook you can use the html fragment <p id="anchor"></p> where you point to the specific paragraph by a similar syntax, example:

<p id="anchor">My paragraph here</p> <!--Or-->
My paragraph here <p id="anchor"></p>

(The last option will put the link bellow the paragraph, because, in fact, create a new empty paragraph). The syntax is simple [Link](path/to/file.md#anchor).

I search in the documentation of Zola but did not find a specific point about this topic, so I decided to ask here.

It is possible today to anchor to paragraphs (or any target place) inside a file in Zola? If not, this feature is likely (or not) to be implemented?

User case: I use mdbook to generate my personal wiki and this feature is crucial for me (and probaby for anyone with similar usar case).

You use the standard HTML to declare an anchor: a link A with a name.

<a name="anchor"></a>My paragraph here...

So that standard HTML links work.

[Link](url-with-the-slug#anchor)

1 Like

Thanks! I think it would be good to add this information at the documentation section Internal links & deep linking Internal links & deep linking here.

I am not sure.
As this is standard HTML, you don’t want to end up including all the HTML+CSS+JS docs in the Zola docs.

However, I think you raise a valid point. In the doc overview, it could be nice to add explicitly that you can include HTML, it can be simpler in some cases than tweaking MD and/or Tera. Something like this?

"Content is written in CommonMark, a strongly defined, highly compatible specification of Markdown. Zola uses pulldown-cmark to parse markdown files. The goal of this library is 100% compliance with the CommonMark spec.
Note: this means you can include HTML as [HTML blocks](
CommonMark Spec )"

1 Like

Exactly! Because, you know, markdown is a HUGE mess and there is an insane number of flavours and variations inside the same “specification”. So it yould be very helpful to put a section apart showing the common raw html tags and options that we can use.