en.osm.town is one of the many independent Mastodon servers you can use to participate in the fediverse.
An independent, community of OpenStreetMap people on the Fediverse/Mastodon. Funding graciously provided by the OpenStreetMap Foundation.

Server stats:

269
active users

Amᵃᵖanda 🔜 FOSSGIS

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?

:boost_requested:

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: gohugo.io/content-management/d

gohugo.ioData sourcesUse local and remote data sources to augment or create content.

@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 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