I made a Jekyll Plugin that lets you use SQLite databases as a data-source (in addition to JSON/YAML files). It has been stable for a while (showed on the HN frontpage once as well), but I finally got around to writing proper documentation for it, so thought it would be a nice time to announce it here.
If you’ve ever struggled with using multiple CSV files, and writing a join between them using Liquid, this plugin is for you. It lets you avoid liquid hell, by using a real data-shaping language - SQL. As a simple usage example.
If you write this in your _config.yml
sqlite:
- data: customers
file: users.db
query: SELECT * from Customers
You can write this in your template, and it will just work:
{{ site.data.customers | jsonify }}
It supports nested queries, works well with the datapage-generator plugin, and lets you parameterize queries using existing page/site level front-matter. I even made a Demo website that shows all features of the plugin.
I’ve been battle-testing it across multiple websites in production and it has held up well. Happy to answer questions and take any feature requests.