/ Open Source

Blackhole

I was following Grav CMS on its path to version 1.0, when this issue caught my attention. It asked the following question. "Is Grav an SSG?" The answer is no, of course, but it became clear that people were interesting in using Grav to generate a static site. That's when I chimed in:

What is Blackhole?

In short, Blackhole is a static site generator for Grav CMS. It is incredibly powerful because you can use Grav as a backend and Blackhole to deploy the generated pages routinely. You get to benefit from Grav (a dynamic flat-file CMS) and the speed and security of a static site, without the manual-ness of a traditional SSG. Blackhole overcomes the perceived performance limitations of a scaled up live Grav implementation (ex. 20,000+ pages has reportedly been a problem for Grav).

Initial Development

I started developing this plugin in October 2016. That's when I quickly discovered a limitation in Grav's API. The data available for Grav plugin development is not the same data available for Grav command line plugins. I had to find a way to bridge the gap. In order to collect all page routes in the generate command, I used some hackery to create my own API call with a custom query: ?pages=all. This query made it possible to load the routes into the file generation process.

Built with Perspective

Many of the current features were direct requests from users, such as asynchronous page generation and the --routes option. I was surprised by the many development environments in which Blackhole was used. Each feature request I received brought a unique perspective that helped shape this plugin.