Title
questions tagged ‘Title’
Titles of pages in the header
I've set up pages as explained, in a Pages folder, but the titles are not the file names, but rather the first sentence of the files, like a post excerpt.
Use the first X characters of a post as title?
I have a fairly large number of posts that are imported from other services and have no titles. My first idea to handle this was to use a custom tag and then show "untitled post" for these posts. Unfortunately, it looks really silly on the archive page when there are several "untitled" posts in a row. My second idea to get the first X chars from the post and use that as the title, but is it possible to get the first X chars in some way? And before anyone suggest using the name of the file, my posts are stored in folders with images and are all called "index.md" which means that I get an archive full of "index" which looks even more silly that "untitled post" 😁
Posts with no title
For some of my entries I want to have a title, for some of them I would prefer not to have one. I modified the Blog template with {{#title}} <h1>{{title}}</h1>{{/title}} and I thought that would solve my problem. I.e. if the post didn't have a title then there would be no title shown, but Blot uses the file name as a title if there is not title in the frontmatter. I tried having an empty title, i.e. title: but then the title became "null". Is it possible to have some entries to have no title?