greghendershott / frog

Frog is a static blog generator implemented in Racket, targeting Bootstrap and able to use Pygments.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

whitespace-only title results in broken behavior

jbclements opened this issue · comments

It turns out that you can make a post with a whitespace-only title. It looks like the existing code then puts the post in the top level for the day. So, for instance, if I have a file called

_src/posts/2018-03-08-temp2.md

That contains the code:

    Title:      
    Date: 2018-03-08T09:26:05
    Tags:

ABCD

... (there's about 5 spaces after the Title: tag), it generates the output in

public_html/blog/2018/03/08/index.html

which definitely my expectations about how frog works.

It would seem to me to be a Good Idea (tm) to forbid posts whose titles don't contain at least one printing character.

Thoughts?

I agree this isn't good.

I saw you made a PR #212 for #211. Thanks!!

However because both #211 and this are part of the same regexp and validation hairball, I went ahead and tried to address both. I want to review what I did, then push a commit to fix both.

Sounds good. Many thanks!