Is there any Static Site Generator which will make pages based on SQL queries? I have a database with 70k rows, and I want to make a webpage for each one?
I wanna replace Townlands.ie with something "static" (which I can regenerate everyday)
I might have to write this myself
@amapanda not a finished solution but Rblogdown + dbplyr + some R scripts sound like the perfect tool for this (to me at least)
@amapanda this is probably not what you are looking for, but if you export the database queries as CSV, JSON, etc many static site generators allow you to generate pages from that? One example: https://gohugo.io/content-management/data-sources/
@fil ooooooh.... Interesting
@amapanda https://astro.build/ is JavaScript, presumably you could do the queries in JS?
@amapanda sadly I don't think there's one around
could use that myself for some sqlite-data I'd want to generate a web representation for
@amapanda fun thing: I've written something for my special use case that does that
but I never thought about it in terms of "this is a static site generator"
maybe I should rewrite it to actually be one? I could make it WAY more flexible If I'd introduce some config-file (mostly just "place your query here") and add some templating language.
damn you! now I got another problem for my todo-list!
@amapanda I don't know your exact use case. But perhaps an #ORM is suitable.
For example:
https://www.prisma.io/docs/getting-started
@astrid current code for t.ie is a Django web application. It's basically an ORM that then renders from the DB
@amapanda I think you can tell Sveltekit to pregenerate everything rather than waiting for people to call it.
@amapanda@en.osm.town hmm, Lume might work?
it can generate pages with JavaScript so you might be able to use JavaScript and do SQL queries with it
@amapanda not quite sure if this helps, but @thisisaaronland has some lightweight approaches https://millsfield.sfomuseum.org/blog/2024/10/02/show/