CSV to Pages

I’m working to make a site which handles my reading list. Recommendations (to-read), things I’ve read, notes I’ve taken on things I’ve read. None of these pages will be especially large, and a lot of each page rides on the toml header, since it’s taxonomy stuff like bookauthor, publicationdate, etc.

I’ve googled around, and really not seen many hits, but does anyone know if there’s a slick method for storing all this book information in a CSV which gets called at zola build time and transformed into pages? Just seems much easier to keep a CSV for something like this, since no single entry is going to be particularly large.

Here’s an example of what the listed pages will look like: reading

And here’s the raw page for one book, in which the TOML is really the bulk of the page activity:

+++
title = "The Poetics of Space"
date = 2024-09-14
[taxonomies]
  readstate = ["reading"]
  rating = ["5"]
  recommender = ["Julian P."]
  authorname = ["Bachelard, Gaston"]
  pubyear = ["1958"]
+++

I read this book first in 2024, and I don't know how it took me that long to hear about it. It's a poetic ramble, a refutation of hard philosophy. It's still very insightful despite its poetic bent.

Thanks!

Not currently possible with how zola works. Zola expects a markdown source for every page you want to create. I previously asked for this two years ago but it didn’t gain any traction: Dynamically create pages from data

In that thread though is a possible solution that you could run outside of zola. Might be something you could try?

An alternative is to use a different SSG that can handle external sources like CSV or JSON. Eleventy might be a good option.

EDIT: If you were happy to make a one page project, you can use Zola’s load_data to parse a CSV and loop through it, rendering out every entry onto the same page. Probably not what you want though.

Super helpful, thanks for the context at least. I might try to do with with a script which runs before build time. Maybe a quick Ruby lambda or something just to transform things from the CSV into markdown, and thence into the zola build.