Can we add upvote features to a website generated using Hugo?

Our website is generated using Hugo, and we want to add upvote features to measure content usage. Can we add upvote feature using vanila JS or a library?

Hey. I am the author of a comment system for Hugo and a twitter integration script. The way I do it, is to have a javascript file, which calls upon a function on a flask server and stores the data in a database. Then, it exports the data to json files, which are added into Hugo’s data directory. I use folders to seperate different urls, so if a comment is done on /blog/test, the resulting file will be data/blog/test.json.

On my server, I have Hugo running in watch mode (hugo -w) without the development server as a systemd service, so it get’s refreshed instantly every time the data files changes.

You could do the same with upvotes. Hope this wasn’t too brief, if you have questions, please do ask.

Thanks @GothSeiDank for the tips. That’s very helpful!! I have been trying to set something similar up. I have created a Node express server and a dump json file in data directory to be rendered in single.html. The next step is to hook up the server and the data directory so that the data file is dynamic and feed the data into section.html. Thanks and happy coding! :slight_smile: