Thoughts of a Dragon

A collection of cool random stuff

BasHTML Reborn

January 21, 2021 — Billy

After a lot of thought and hours of coding, I decided to give BasHTML a huge overhaul. The new code is a direct fork of Bashblog by Carlos Fenollosa. I have several reasons for the rewrite, some of which are below.

  • The website layout is well designed by default. As a blind coder, it is hard to make sure that pages look good visually.
  • All the page building, tags, etc is already done.
  • With the infrastructure already in place, I can focus mainly on adding the features I wanted the original BasHTML to have.

As with the original BasHTML, this version includes a second plugins repository. At the time of this article, there are only a couple plugins available. One posts the music track you are listening to as you write, the other is a sync plugin that adds the command sync to BasHTML. The sync plugin pushes the whole site from your local machine to the remote server so that it becomes live. It requires the rsync daemon to be configured.

I find it easier to do writing on the local machine, then push to a remote server. The Original Bashblog was designed to do the article writing and posting right on the server itself. While you can certainly still do this with BasHTML, it is more designed to be used locally. The latency of remote servers, even fast ones, can make them more difficult to navigate when writing documents with a screen reader.

So far, the changes to the code include the following.

  • Plugins system that allows you to extend the functionality, including adding new commands.
  • On first run a .config file is created with your BasHTML settings.

There is still quite a bit of work to do before I get it where I want it. I plan on moving the Disqus and Twitter stuff to plugins. This will require a decent amount of effort to be sure I don’t end up breaking something while moving the code around. I also want to add Schnack as another possibility for comments as well as several other plugins.

The plugin system opens up a world of new possibilities. I think it would even be possible to create a media based site, where you could post your videos, images, and audio without much effort. The plugin I have in mind would take a path to a media file, extract information from it, and create a filled in post with everything already in place including an embedded player for the type of media added.

The code is progressing quite nicely now that I have made the changes mentioned above. If you are interested, clone a copy and follow along. I have high hopes for this project. If you have something you want added, open a pull request if you can, or a feature request and I will see what I can do.

Composed to the sound of Amon Amarth - Berserker - Raven’s Flight

Tags: bashtml, bashblog