A lot has gone on since the last update. The theme has completely changed under the hood and has a new name. There’s a new form-handling server (currently in beta) that makes it easy to do what you want when people submit forms on your website. Plus, future plans for keeping the projects sustainable.
After deciding I was going to add other, related software under the umbrella of BluestNight, I figured I needed to rename the theme to avoid ambiguity when writing about the theme versus the collection of software. Midnight sounded like a good name, it wasn’t taken on the Hugo Themes showcase, and it fits the BluestNight theme. Midnight it was.
A lot has changed between the last release of BluestNight theme and the first release of Midnight. Some were planned. Others came about after I realized now would be the best time to do any backwards-incompatible changes.
The theme was originally written with Foundation, a CSS framework similar in ways to Bootstrap, but without that “this was definitely made in Bootstrap” feeling. Foundation was removed when I decided to make the theme a little lighter by implementing only the things I needed. It’s been added back in now that I have other projects to work on - it’s nice to let the framework do some of the heavy lifting - and to make this next item easier.
Possibly the biggest change under the hood - maybe second to switching in Foundation - was the gutting and reorganizing of the templates to foster a plugin system.
Midnight supports four kinds of plugins: general plugins, sidebar widgets, shortcodes, and comment providers.
General plugins are the simplest kind of plugin. They are
only able to insert content into the
<head> and at the end of the
adding metadata to each page. You could, for instance, load custom fonts and
use them instead of the theme defaults, or integrate a different analytics
system on the site.
Sidebar widgets have existed as part of the theme before, but this allows site creators to make their own widgets to integrate with their needs. Widgets can also insert code into the site like general plugins: Midnight will automatically include that code when that widget is enabled.
Assets, Not Static Files
Optimizing For The Modern Web
Midnight now comes with the option to optimize for HTTP/1.1 or HTTP/2. You can find a discussion about the differences in the documentation, but the big idea is that a few large, bundled files is better for HTTP/1.1 and a bunch of small, separate files is better for HTTP/2. Midnight allows you to choose which to build for. If you really wanted, you could even build one for each and let your server choose which version to serve, based on if the browser supports it or not.
Changed Shortcodes, And More
A new shortcode has been added to work with the new
form-handling server. The
static shortcode has been renamed
link and is now much more powerful. Plus, a bunch of
other smaller things I may have forgotten. It’s really worth looking through
the documentation, especially if you were previously using BluestNight.
Meet Nebula, the newest addition to the BluestNight suite of software (if it can be called that yet).
Nebula is a form-handling server configured with TOML files that lets you choose what to do when a form is submitted. It’s written in Go and takes advantage of Go’s template system (the same one behind Hugo themes) and Go’s plugin system to make a customizable and extensible piece of software. It is integrated with Midnight but can be used with any website on any platform.
Nebula currently only supports sending emails when forms are submitted, though those emails can be easily customized using templates, even to determine whether fields should have values at all. It also supports generating errors to return to the user - the most important piece of server-side validation.
The software is currently in beta, as it hasn’t been battle-tested too much and there are some security-related features I’d still like to build in - features like audit logs and rate limiting to help prevent people from abusing the server software.
Supporting the Projects
If you like the stuff I’m doing, please consider donating. I work on these and other projects in my spare time, and paying for server space, privacy policies, and other things necessary to keep this all running is burning through my savings. I’m a full-time college student, so once school starts I’m going to have a lot less free time to work on these projects. I’d rather not have to spend it working on campus to be able to pay server bills.
For those who are curious how much that is, I’ve posted previously on my personal programming blog about what those costs are.
The two main ways you can support are through Patreon and Liberapay. Both are recurring donation platforms, so if you want to make a one-time donation, the best way to do so is to subscribe for the amount, then unsubscribe when the payment goes through.
Finally, thanks to those who are currently supporting as they are able. It’s not much, but it does help.
I’m going to be working on building Nebula into a good stable release, plus contributing to Commento, a self-hosting comment platform that is integrated with Midnight. It’s not enabled on this site yet as there are a couple of things I’d like to see in it first, but it will soon be the system running the comments on this and my other sites.
Past that, I intend on making a server that integrates with Stripe and platforms like Patreon and Liberapay to give subscribers a single account that can be used to access versions of Nebula and Commento hosted by me, as a thank you for supporting. It probably won’t come for some time, as I work on getting some other things polished first, but it will happen.
Until next time!