To Title or Not to Title

I found something intriguing: Some of the Blot templates render the title of a blog entry (as you can set it in the metadata) nicely as a heading, others don't do so. For example Isola renders it, but Magazine doesn't.

So for Magazine you would need to repeat the title as na explicit Markdown heading. This might be desirable -- or not so.

In any case the inconsistency makes it hard to switch between templates. So my question now is: What's the standard here? Is there even a wider standard beyond Blot?

Asked 5 months ago • Improve this question
6 replies

This is basically a distinction between how templates handle a metadata title, and a title tag (e.g. a <h1> or # heading) in the post itself.

Sometimes people want to be able to set the metadata title when the post appears in the index or archive, without the title appearing on the permalink page. This is especially true for photo posts.

I understand it's confusing though, and should probably standardise this for the non-photo templates. You can adjust this yourself if you fork your template and add the following to your template's entry.html file inside the {{#entry}}...{{/entry}} block:

{{^titleTag}}
<h1>{{title}}</h1>
{{/titleTag}}

This code basically says, if there is no title tag, please insert the metadata title.

Answered 5 months ago · Improve this answer

Aha, I didn't think of something like a photo blog!

Yes, I guess it makes sense to standardise the non-photo templates.

Answered 5 months ago · Improve this answer

I totally get that the distinction between title metadata and title tags is confusing though, it's tripped up a number of people over the years and I wonder if the cost is worth the benefit?

Answered 5 months ago · Improve this answer

It is indeed super-confusing.

Just so that I understand it correctly: If in the text of the Markdown is a # heading written, then this will become the titleTag, right?

Answered 5 months ago · Improve this answer

Yes, this post has a title tag:

# Your title here.

Your post here...

But there is no title tag, only title metadata in this post:

Title: Your title here.

Your post here...

I get why this is confusing, I'm going to adapt all the built-in text templates and follow up here.

Answered 5 months ago · Improve this answer

Cool. Then I can have a peek at how you do it in the standard templates. :-)

Answered 5 months ago · Improve this answer

Markdown allowed

Question or feedback?

Contact us
How to password-protect a site? Thumbnails on social media? Title in menu vs title on page? Home Page Alt Text for Images

On this page