Jigsaw Static Site Thoughts

April 29, 2020

jigsaw

I was looking for a project to help me do a few things. write a blog, store reference material for things I am interested in, create a database of plants I like to grow, learn about markdown & JSON and also expand my use of shell scripts.

Having been online for 25 years, I have gone from an all rounder managing CSS, graphics, code and servers back to being an all rounder doing the same thing. In the intervening years, I have worked with PHP, Codeigniter and now mainly Laravel and have set up this system to allow me to entertain myself whilst (re)learning CSS, Javascript, Markdown, JSON, Bash Scripting and Graphic Design, something I have ignore for too long.

Having moved to using Debian Linux as my main daily machine, I have enjoyed setting up a number of projects but wanted somewhere to combine and publish my writing and experiments for all to see.

So although I had known about Jigsaw for years as a Laravel developer, i recently took the plunge and installed it. I have tried a number of other static site generators including Hugo and Jekyll but they didn't really click with me for a number of reasons. Although I have 'played' with Ruby, Go and Python, I tend to fall back to bash and PHP as the languages i like. I also wanted something that wasn't huge, but powerful enough for me get stuff done without a huge learning curve.

So Jigsaw uses the Laravel Blade syntax that I have used in many other projects and comes with a neat quick start blog with a nifty search facility from fuse.js which uses json. I created a site with a blog (_posts) and static pages (_pages), but the search facility only indexed the blog. No problem, i created a new collection in the generateIndex handle method and merged the 2 collections, then hey presto, it worked.

There are a number of features I liked 'out of the box' there was a RSS/ATOM feed included. This is great as I am a big fan of the RSS feed concept.

The basic app also had a category system which I have included via an autogenerated collection in the config file.

The Jigsaw blog system also uses Tailwind CSS, Webpack and Laravel Mix to process the CSS and Js with the npm run dev and npm run production commands.

I have really quite enjoyed the experience and will publish this all on github.io and github.com/allotmentandy in the near future. Enjoying working with CSS and next for the imagery.

Playing with the SVG image format is also on the to-do list.

Observations

[ ] fuse.js search json generator only takes the first 255 chars of the page content.

[ ] the build process is very fast, taking about 0.2 seconds to build the site.

[ ] Tailwind CSS is really nice once you get your head around it, it is like CSS used to be.

[ ] I miss the 'php artisan' commands, i want a script to create a blog page for today, with the date and time now, the filename i give it and a basic div. like this php artisan make:post 'title of post' but i will make it in bash

← Templates, Markdown and Shell Scripts for Jigsaw


If you would like to contact me you can either use this form on londinium.com or via Twitter @andylondon