Hi! I’ve been working with Hugo for a while and I also created a free MIT licensed theme with it!. I love the flexibility and the ease of use.
But I’ll have to wok on a bit more complicated project than a simple showcase website/blog. The content to be published on it is not a lot, but it would be definitely better if I could:
- Get/Post some content with API to avoid posting multiple times the same articles on different platforms, getting modifications as well.
- Send posts digests via email / Download PDF post digests.
- Post on social medias (?)
- Parse some content from CSV files / I don’t know anything about databases.
Now I know that I can do something like this with a little systemd service I might write on my own and something like Zapier + RSS feed + Mailchimp. Also I could leverage Hugo modules and the .GetRemote / transform.unmarshal
command, to get content from remote sources.
Now I’m not really a lot more than an amateur developer, I was thinking a headless CMS could pheraps do this stuff and more in a better way (?). I’m not a webdev and I know only really really basic JavaScript, I can use Bootstrap for frontend confidently and add SCSS to it. I know a bit of Rust too.
Would it be worth to take the time learning how headless CMS’s work? I don’t really want to go back managing Wordpress plugins, updates ecc.
Do you think I’m going out of a static site generator purpose with this kind of project?
It comes down to, what can be done or pre-generated at build or publish time versus what must be done at runtime (such as when a viewer accesses a post)? Stuff that must be done at runtime is stuff you don’t have the necessary information to do at publish time. For example you can’t pre-generate a comments section because you don’t know what the comments will be before a post is published.
For stuff like email digests and social media posts I might set up a CI/CD system (likely using Github Actions) that publishes static content, and does those other tasks at the same time. Or if I want email digests delivered on a set schedule instead of at publish time I might set a scheduled workflow in the same CI/CD system. Either way you can have automation that is associated with your website that isn’t directly integrated with your web server.
As you suggest some stuff that must be done at runtime can be done with frontend Javascript. That’s how I implement comments on my static site. I have Javascript that fetches a Mastodon thread that I set up for the purpose, and displays replies under the post.
I don’t exactly follow your first and fourth requirements so it’s hard for me to comment more specifically. Transforming information from CSVs to HTML sounds like something that could naturally be done at build time if you have the CSVs at build time. But I’m not clear if that’s the case in your situation.