bearblog icon indicating copy to clipboard operation
bearblog copied to clipboard

Post title in link

Open metbril opened this issue 8 months ago • 3 comments

I'm not sure if this 8s a bug or a missing feature.

I'd like to add this markdown to my post template or footer:

[Reply to this post by email](mailto:[email protected]?subject={{ post_title }})

Unfortunately this is not rendered but shown as plain text. When I add this, it does work:

[Reply to this post by email](mailto:[email protected]?subject=Blog)

So it must be the inserted variable.

Would you be able to fix this?

Or am I using the wrong syntax and should I add quotes somewhere?

metbril avatar Apr 26 '25 15:04 metbril

This is a known issue where the post_title variable interferes with the Markdown renderer. In the meantime you can just use HTML. I've tested the following and it works perfectly:

<a href="mailto:[email protected]?subject={{ post_title }}">Reply</a>

I'll leave this issue open just so that it's on my radar.

HermanMartinus avatar Apr 27 '25 07:04 HermanMartinus

Well, this only works from the post (template), unfortunately. It would be cool if I could add this to my footer as well.

metbril avatar Apr 27 '25 15:04 metbril

Hmmmm, yeah. The footer doesn't have the post context due to how the template is structured. I've made a note about it.

HermanMartinus avatar Apr 28 '25 05:04 HermanMartinus