Hacker News new | ask | show | jobs
by kijin 4488 days ago

    <!--t Here is the post title t-->
I hate non-standard stuff like this, even though I myself do similar things all over the place. It's the kind of the thing that's OK if you do it to yourself, but immediately rings an alarm when it is distributed to the general public. When you're already doing something non-standard by using a flat file instead of a well-known DB format, you might as well use standards in other places so that people have fewer reasons to complain.

For example, Markdown has a special syntax for <h1> tags. It looks like this:

    This is a title.
    ================
Since it is extremely unlikely that an <h1> tag will be used for anything other than the title of a post, why not use it to mark a line as the title?

Or maybe use the MultiMarkdown convention of colon-separated header fields at the top of the file, like:

    Title: This is the title.
    Tags: foo, bar
    Date: March 3, 2014
1 comments

The initial version was using a standard markup for the title but I change it due to avoid if there is a double h1 :)

For the next point as tags, dates, I chose to put it as a filename for the sake of speed.

In HTML5, it's OK to have multiple <h1> tags in a page, provided that they belong to separate sections, articles, etc.
If you try it, you will realize that to write an article using the admin panel is quite user friendly :)