How to handle content on small business site?

with Zola and other static site generators, the site structure is determined from the directories and markdown files in the content directory. This makes sense for blogs etc. but I want to create a static site for a small business.

I this case I would create the whole site including its content in the HTML templates. I would create empty markdown files with just the frontmatter to set page title and a different template for every sub-page.

While this works, it kind of doesn’t make much sense to me and feels like Zola is the wrong tool for the job. Even worse, if I want my client to be able to make small content changes by himself, he would have to dig through the html templates and make changes there. That doesn’t work for obvious reasons.

While the latter part could be adresses by a headless cms, it also isn’t clear to me how I would integrate that with Zola? Zola would need a mechanism to fetch content from external API during the build process and replace templates blocks with this content. I think currently it can’t do that, right?

But even if I could get that working, relying on the content directory to setup the site structure feels soo wrong.

So… is anybody here using Zola for similar purpose? How do you do this?
Any ideas? Or maybe suggestions for other tools that suite my use case better?


edit: Lets say I follow the content directory structure. And lets say I have different blocks of text in my html template. Can I create multiple .md files, each representing a block of text instead of the whole page? With empty md files the content would be in the templates, but if it could work like this I had a separation again…

1 Like

I think so. You could use the load_data function to read from MD files and insert the content in templates.

1 Like

You may like to take a look a my setup.
I use Directus as a headless CMS, then a custom script that glues it with Zola. Then each website has its own script that permit to generate its content folder based on the CMS. See for example this website’s script.
The content directory structure makes sense in my context though.

1 Like