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?
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 2 years ago · Edit answerAha, I didn't think of something like a photo blog!
Yes, I guess it makes sense to standardise the non-photo templates.
Answered 2 years ago · Edit answerI 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 2 years ago · Edit answerIt 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 2 years ago · Edit answerYes, 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 2 years ago · Edit answerCool. Then I can have a peek at how you do it in the standard templates. :-)
Answered 2 years ago · Edit answer