Does a blog have to be HTML?

Terence Eden wrote about his recent experience of IndieWebCamp Brighton, in which he mentioned that somebody – probably Jeremy Keith – had said, presumably to provoke discussion:

A blog post doesn’t need a title.

Terence disagrees, saying:

In a literal sense, he was wrong. The HTML specification makes it clear that the <title> element is mandatory. All documents have title.

But I think that’s an overreach. After all, where is it written that a blog must be presented in HTML?

Non-HTML blogs

There are plenty of counter-examples already in existence, of course:

But perhaps we can do better…

A totally text/plain blog

We’ve looked at plain text, which as a format clearly does not have to have a title. Let’s go one step further and implement it. What we’d need is:

  1. A webserver configured to deliver plain text files by preference, e.g. by adding directives like index index.txt; (for Nginx).5
  2. An index page listing posts by date and URL. Most browser won’t render these as “links” so users will have to copy-paste or re-type them, so let’s keep them short,
  3. Pages for each post at those URLs, presumably without any kind of “title” (just to prove a point), and
  4. An RSS feed: usually I use RSS as shorthand for all feed types, but this time I really do mean RSS and not e.g. Atom because RSS, strangely, doesn’t require that an <item> has a <title>!

I’ve implemented it! it’s at textplain.blog.

textplain.blog in Lynx
Unlike other sites, I didn’t need to test textplain.blog in Lynx to know it’d work well. But I did anyway.

In the end I decided it’d benefit from being automated as sort-of a basic flat-file CMS, so I wrote it in PHP. All requests are routed by the webserver to the program, which determines whether they’re a request for the homepage, the RSS feed, or a valid individual post, and responds accordingly.

It annoys me that feed discovery doesn’t work nicely when using a Link: header, at least not in any reader I tried. But apart from that, it seems pretty solid, despite its limitations. Is this, perhaps, an argument for my .well-known/feeds proposal?

Anyway, I’ve open-sourced the entire thing in case it’s of any use to anybody at all, which is admittedly unlikely! Here’s the code.

Footnotes

1 no-ht.ml technically does use HTML, but the same content could easily be delivered with an appropriate non-HTML MIME type if he’d wanted.

2 Again, I suppose this technically required HTML, even if what was delivered was an empty file!

3 Gemtext is basically Markdown, and doesn’t require a title.

4 Plain text obviously doesn’t require a title.

5 There’s no requirement that default files served by webservers are HTML, although it’s highly-unsual for that not to be the case.

Reactions

No time to comment? Send an emoji with just one click!

11 comments

  1. James Doc James Doc says:

    Chris Coyier started no-title posts in March- https://chriscoyier.net/2024/03/03/11148/

    His starting point is that social content doesn’t have titles, and RSS doesn’t require it…

  2. Dan Q Dan Q says:

    Now I’m wondering whether I could have implemented textplain.blog as a WordPress theme. 🤔

  3. Terence Eden Terence Eden says:

    @Dan Oooooh!
    Yes, it *should* be possible. I might have a play this weekend 😁

  4. Terence Eden Terence Eden says:

    Here’s a plaintext functions.php

    
    <?php 
    header('Content-Type: text/plain; charset=utf-8'); 
    bloginfo( 'name' );
    echo "\n";
    
    if ( have_posts() )  {
    
            while ( have_posts() ) : the_post();
    
                    if ( get_post_type() == 'post' ) {
                            the_time( get_option( 'date_format' ) ); 
                            echo "\n";
                    }
    
                    the_title();
                    echo "\n";
                    echo strip_tags(get_the_content()); 
                    echo "\n";                
            endwhile; 
    }
    

  5. CraigM CraigM says:

    RSS not requiring a title element was a conscious design detail, much of its original form was expressed by Dave Winer (who is still writing at scripting.com) and he very strongly believed that the flexible nature of the “weblog” as we then called them meant short entries would most likely be self-descriptive and hence no separate title.

    Therefore, RSS conveniently is flexible to be appropriate for much of the social, micro blogging type content we now see and also the full blown full-text blog entries. Given the recent move (resurgence?) toward POSSE, I’m encouraged to see adoptees like Molly White push forward and adopt/exploit this. ATOMs more rigorous XML schema looks a little inflexible and prescriptive sometimes …

  6. Dan Q Dan Q says:

    Thanks @CraigM. I work adjacent to Dave Winer; I should ping him to let him know about this conversation!

  7. Colin Walker Colin Walker says:

    I doubt there will be much call for it but, off the back of this, I included a check for Link http headers in my reader. It found the feed when giving it https://textplain.blog/ but, for some reason, refuses to bring in the posts. Not sure why.

  8. Dan Q Dan Q says:

    @Colin Walker: perhaps you’re requiring a title in the item?

  9. Colin Walker Colin Walker says:

    @Dan: nope, it’s coded not to need them as per the spec.

  10. Dave Winer Dave Winer says:

    Thanks to @danq for the heads up on this thread. I think @craigm pretty much nails it.

    If Google Reader had handled untitled posts more gracefully we’d be in a much better place today.

    Their choice to require titles meant we have had a fracture, on one side — social web and on the other feed readers.

    A lot of us now are trying to get rid of that separation.

    For example, in FeedLand we handle titleless posts as well as titled posts.

    Also RSS 2.0 and 0.91 didn’t anticipate that there would be untitled posts, there were untitled posts at the time. UserLand’s blogging products did not require titles for posts, they were organized so writers had the choice whether or not to add a title. Therefore any format we supported at UserLand had to have the option.

    Have a look at the home page of scripting.com right now, you’ll see a mix of titled and untitled posts. It’s been that way for a long time. ;-)

  11. Terence Eden Terence Eden says:

    I’ve gone a little overboard!
    You can now add .txt the end of most URls on my blog and get a plaintext version of the page.

Reply here

Your email address will not be published. Required fields are marked *

Reply on your own site

Reply elsewhere

You can reply to this post on Mastodon (@blog@danq.me), Mastodon (@dan@danq.me).

Reply by email

I'd love to hear what you think. Send an email to b23604@danq.me; be sure to let me know if you're happy for your comment to appear on the Web!