{"by":"captn3m0","descendants":65,"id":42244987,"kids":[42247942,42246199,42247687,42245859,42255914,42247433,42249789,42250213,42250772,42246811,42247105,42247769,42250501,42250427,42247754,42249190,42246805,42247106,42246816,42247996,42248831,42245939,42246186,42246212,42255958,42254343],"score":227,"text":"I love Jekyll, especially the Datafiles[0] feature, which lets you use CSV&#x2F;JSON&#x2F;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.<p>However, Liquid is a terrible language for data-mangling, and simple filtering&#x2F;sorting&#x2F;merging can become very annoying. So I wrote a Jekyll SQLite plugin that lets you use the same data interface in Jekyll&#x2F;Liquid, but backed by a SQLite file(s).<p>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.<p>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&#x2F;category&#x2F;customer.<p>I&#x27;ve been using this across a few sites in production for almost a year, looking for feedback on usage semantics and feature suggestions.<p>[0]: <a href=\"https:&#x2F;&#x2F;jekyllrb.com&#x2F;docs&#x2F;datafiles&#x2F;\" rel=\"nofollow\">https:&#x2F;&#x2F;jekyllrb.com&#x2F;docs&#x2F;datafiles&#x2F;</a><p>[1]: <a href=\"https:&#x2F;&#x2F;github.com&#x2F;avillafiorita&#x2F;jekyll-datapage_gen\">https:&#x2F;&#x2F;github.com&#x2F;avillafiorita&#x2F;jekyll-datapage_gen</a><p>[2]: <a href=\"https:&#x2F;&#x2F;simonwillison.net&#x2F;2021&#x2F;Jul&#x2F;28&#x2F;baked-data&#x2F;\" rel=\"nofollow\">https:&#x2F;&#x2F;simonwillison.net&#x2F;2021&#x2F;Jul&#x2F;28&#x2F;baked-data&#x2F;</a><p>[3]: <a href=\"https:&#x2F;&#x2F;northwind.captnemo.in&#x2F;\" rel=\"nofollow\">https:&#x2F;&#x2F;northwind.captnemo.in&#x2F;</a><p>[4]: <a href=\"https:&#x2F;&#x2F;github.com&#x2F;captn3m0&#x2F;northwind\">https:&#x2F;&#x2F;github.com&#x2F;captn3m0&#x2F;northwind</a>","time":1732623091,"title":"Show HN: SQLite Plugin for Jekyll","type":"story","url":"https://github.com/captn3m0/jekyll-sqlite"}