=============================================================================
|  __          __                 0x0x is dedicated to the exploration of   |
| /  \ __  __ /  \ __  __         simple technologies and distributed       |
|| <> |\ \/ /| <> |\ \/ /         protocols for taking back the internet.   |
| \  / / /\ \ \  / / /\ \                                                   |
|  ~~  ~~  ~~  ~~  ~~  ~~                                                   |
=============================================================================
                            

2023-01-22 - Generated Blogs and RSS

I've just finished a first round of improvements of the news feed on this server (that's the thing containing the text you're reading right now :-)). Now new posts are generated from simple text files. Full versions of a post can be independently linked and there's a dedicated news page and an RSS feed.

The text file format is variable. It's defined by the contents of the first line. At this time, the only format that's fully implemented is "NML" ("Natural Markup Language," a language similar to Markdown that I initially created in the mid-90s).

For example, a blog post might look like this:

    #nml
    \timestamp(2023-01-22T13:58:44-05:00)

    2023-01-22 - Example Blog Post
    ==============================

    Here's a nice example blog post containing a \ref(`http://example.com`
    link to nowhere!)  This part of the file will be visible on the blog main
    page and in the RSS feed item for the post.

    \more(.)

    Anything below the `\more(.)` tag above will only be visible if the user
    clicks the "Read More" link to read the entire post.  It won't show up in
    the RSS feed.

When blog endpoints are hit, the server just scans a "news" directory and reads all of the files in it. It then renders either a blog page containing article summaries or an RSS feed or a single article.

The blog page (or some number of entries in it) can also be embedded in other pages generated by the server. Generally speaking, these are plain HTML snippets but (like most backend rendering engines) they can also contain special markup that gets expanded programmatically, with the initial use case being an embedded news list.

The feed generation code is independent of the blog code, so I'll be able to reuse it for messaging or ActivityPub if/when I get those running.

I've done this sort of thing before, mostly for statically generated sites, but I think this is probably the most nicely integrated solution I've come up with. I'll publish the complete server source as soon as I go through the necessary legal process with my employer. Since nobody is clamoring to use it at this point I'm in no rush.

But if you're interested, drop me a line and I'll expedite :-)

Main Page Login
Theme: