Is there any way to hyperlink to the middle of a post?

I’m aware of how to use Markdown to link to a point within a post using <a tags, but my question is: is there any way I can do that from outside a post using a URL to point me to the post and the location within it? (assuming someone has already set up the appropriate tag within it). If not, wouldn’t that be a great extension of the standard?

Yep, it works exactly the same way as within a post, just add the # at the end of the URL. For example:

https://meta.discourse.org/t/developer-s-guide-to-discourse-themes/93648#heading--4-b

https://meta.discourse.org/t/developer-s-guide-to-discourse-themes/93648#heading--4-b

7 Likes

Brilliant … thanks David! I had tried # but was putting in a / character just before it

1 Like

@david what does the target markdown look like? I think I’m messing that up …

You can have a look at the markdown for any post by going to a link like

https://meta.discourse.org/raw/93648/1
(`/raw/{topic id}/{post number}`)

So they look something like this:

<h4 id="heading--2-d">Some heading</h4>
5 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.