Tuesday, 26 November 2024

Show HN: SQLite Plugin for Jekyll https://bit.ly/4fJ9Zo9

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://bit.ly/49apxi1 [1]: https://bit.ly/3B0iVq0 [2]: https://bit.ly/3CGZSBI [3]: https://bit.ly/495dLWr [4]: https://bit.ly/3V9gU1G https://bit.ly/3AOx21J November 26, 2024 at 01:11PM

No comments:

Post a Comment