Scroll to top

13/01/2023


2023/01/13#p1

1 comment: click to read or leave your own

Further to the last post, I felt inspired to tinker and created a proof of concept 'hybrid' blog that uses dynamic pages but builds them on the fly from static markdown post files.

You can check it out here.

In a way, it's almost like a return to how the blog operated on WordPress before switching to (b)log-In – each day is a single .md file divided into sections by an '#' separator. If there are no posts yet on a given day the file will be created with the first post and edited thereafter. The blog page reads the file for the date in question, pulls out the posts and displays them individually.

As with the actual blog, you can click the comment icon before a post to toggle the comment section and leave comments. These are also written to .md files with a name corresponding to the date and post number.

It's really basic at the moment; I haven't worried about organising post and comment files in date based folders, or the logic that would go with that, but it shows how a site like this can be put together. While the post files are created by the system itself, there would be nothing stopping you creating them offline and uploading via FTP. Eventually, I could even devise a system that allows you to upload files via a web UI, checks the date and places it the right location.

There are a few places where it currently relies on (b)log-In's config file and database (only because I couldn't be bothered to rewrite everything) but I'm still surprised by how quickly it's come together. I've even created a separate database-free authentication system which seems to work nicely.

Once I've spent a bit more time on it I may put it on GitHub.

avatar
Andy mentioned this post.
Leave a reply



You can also:

Click here to reply using email Reply by email Send a webmention Send a Webmention



No comments yet
Leave a reply



You can also:

Click here to reply using email Reply by email Send a webmention Send a Webmention



2023/01/13#p3

3 comments: click to read or leave your own

Why create another blog engine/platform? (I'm calling it hyblog 1 by the way.)

I suppose curiosity is the primary reason, just to see how it would work and what the benefits/drawbacks are over a database driven system.

And the ever dangerous "because I can!"

Thus far, it's been simpler working with post files than database connections but this will get more complex once I try organising them by folders. Maybe, more fiddly might be a better way of putting it. I'll find out over the weekend.

I'm not sure how fully featured I want to make it compared to (b)log-In. Is it a waste of time or could I learn better ways of doing things that I can port back?

Regardless, it's a fun exercise – something to get the brain working properly again.


  1. a somewhat obvious amalgam of hybrid and blog 

avatar
Andy Sylvester says: Reply to Andy Sylvester

Tried to send a webmention, but kept getting a "Cannot find target URL" message. https://andysylvester.com/2023/01/15/2752/

avatar
Colin Walker replied:

Thanks Andy, I'll have a look at that.

avatar
Colin Walker replied:

Ah, I see why. The link in your post just goes to the page '?date=2023/01/13' and not the post itself '?date=2023/01/13#p3'. If you add the fragment it should work.

Leave a reply



You can also:

Click here to reply using email Reply by email Send a webmention Send a Webmention



Close