# Generating titles

One of Blot’s principles is ﬂexibility. I want to be able to publishing a tiny snippet of text to my blog without Blot complaining. Blot will work around me in the background to generate appropriate metadata (such as publish date or permalink) if none is speciﬁed.

For instance, this is the pseudo code for how Blot generates a title from a ﬁle:

If one of the ﬁrst 3 nodes of the entry is a heading: Title is the text of the earliest greatest heading.

Else if there is a node with text in the entry: Title is the ﬁrst sentence of the ﬁrst node with text.

Else Title is derived from the ﬁle’s name. For instance /word_doc.txt becomes Word doc’ and /2015/why-hello-there.txt becomes Why hello there’

This is complex requires some ﬂexibility. But the beneﬁt is that Blot will not complain if you do not specify a title for a blog post.

Everything is ﬂexible.