Live demos and experiments
I recently attended a Swedish frontend development conference called nordicjs. Something that I noticed was that some of the speakers had made tools and demos that they were using live in their keynotes which I thought was pretty neat!
It got me thinking about being able to host tools like that along with my static site generator. As long as they're not too heavy and dependent on JS libraries.
My SSG project is built up around a plugin chain where one of the plugins available is a file loader. So to start off i just added a new directory for what I call playgrounds and added a new HTML file into the files array of the plugin which makes sure that it is available in the built site.
The result? The very first playground of this site. It's a very simple HTML + CSS playground with a preview pane that will show you the result. To start off it shows the CSS logotype, but change any parameter and it will update immediately. Source BTW.
This initial playground is meant to be part of something bigger. I have thoughts about building a presentation framework and I want these kinds of interactive and editable examples to be part of it. But we will see when I get the urge to build it.
Until then I will have a way to make different demos and experiments available.
Right now they will show up as menu alternatives on the home page. I also noticed that since files loaded by the file loader plugin wasn't designed to end up on the home page post flow they always end up at the top which isn't ideal. I'll have to do something about that in the future or just simply have a blog post that link to each playground. I probably want to write something about it anyways. Edit: I updated the file loading so that is isn't present on the home page.
Until next time.