Show HN: SQLite Plugin for Jekyll

I love Jekyll, especially the Datafiles[0] feature, which lets you use CSV/JSON/YAML files and iterate through them. Mixed with the Jekyll Data Pages generator[1], which lets you create a page for every row in your dataset, it is a very powerful combination.

However, Liquid is a terrible language for data-mangling, and simple filtering/sorting/merging can become very annoying. So I wrote a Jekyll SQLite plugin that lets you use the same data interface in Jekyll/Liquid, but backed by a SQLite file(s).

It gives you the simplicity of the Baked Data pattern[2], and the flexibility of using SQL for data-wrangling, within a static site generator.

As a demo, I took the northwind dataset, and generated a site[3] with a few sample queries[4]. It demos both site-level, and page-level queries alongside data-pages generator to generate a page for every product/category/customer.

I've been using this across a few sites in production for almost a year, looking for feedback on usage semantics and feature suggestions.

[0]: https://jekyllrb.com/docs/datafiles/

[1]: https://github.com/avillafiorita/jekyll-datapage_gen

[2]: https://simonwillison.net/2021/Jul/28/baked-data/

[3]: https://northwind.captnemo.in/

[4]: https://github.com/captn3m0/northwind


Comments URL: https://news.ycombinator.com/item?id=42244987

Points: 63

# Comments: 10

https://github.com/captn3m0/jekyll-sqlite

Created 1mo | Nov 26, 2024, 3:20:10 PM


Login to add comment

Other posts in this group

Tell HN: John Friel my father, internet pioneer and creator of QModem, has died

If you knew him in life or remember his contribution to the world, please share your stories.


Comments URL: https://news.ycombin

Dec 30, 2024, 7:50:09 PM | Hacker news
Show HN: I built open source file sharing solution using AWS S3

I created a 100% Open source Company-wide Self-hosted File Sharing Solution for Teams

Recently, I wanted to share HD images and video files with my graphic designer. She’s exceptional at her cra

Dec 30, 2024, 5:40:11 PM | Hacker news