HermanMartinus / bearblog

Free, no-nonsense, super fast blogging.
MIT License
2.36k stars 73 forks source link

Can I reference the title in the post? #254

Closed kevquirk closed 8 months ago

kevquirk commented 8 months ago

Hi folks,

Wondering if it's possible for me to reference the title front matter within the post? For example, I'd like to add a "Reply by email' button at the end of each post, but would like it to use the post's title as the subject line, so the link would be something like this:

<a href="mailto:mail@example.com?subject=Reply to: [POST-TITLE]">Reply by email</a>

Here I would like to replace [POST-TITLE] with the actual title of the post. In SSG's like Jekyll, this would be {{ page.title }}. Is this possible in Bear?

Thanks!

pimoore commented 8 months ago

Along those same lines, the ability to reference other frontmatter would be super helpful. For example, the description could be called using a variable within the post, acting as a post excerpt. This makes it easy to add an element without having to manually do it, and of course target it with CSS styling.

HermanMartinus commented 8 months ago

Hey guys, these are great ideas. I've created a feature request card for it here. You can vote on it and leave any clarifying comments and I'll consider it in the next build cycle.

kevquirk commented 8 months ago

Great thanks, Herman.