I’m doing my blog with Hugo and would like to include this “stats” section floating on every page. Sort of a progress bar for several projects I have going on.
I was wondering how to accomplish that without recurring to server side includes.
See, having a single .php file to update with the project stats would be really cost effective. Update one file, upload, boom.
Now with Hugo every time I update my progress, I would have to upload the entire blog! Each .html file where this floating stats with the progress bar its shown.
Say my blog has 1000 entries. I will have to upload 1000 HTML files when I only need to update one file.
That’s a bit excessive, even for my strange tastes.
So what are my options? jQuery.load call? An iframe?
I like the jQuery.load idea, but (as far as I understand) I will be forcing people to download the page they are seeing, plus the page in the jQuery.load only to show a stats#div from that page.
Not really cost effective for the user.
That jQuery.load would be a “dirty” way to make a Hugo HTML include.
Another way of doing it would consist in having the stats data in an external .js file I can easily update without uploading the entire site again.
I could also use a data TOML file, but that only works to generate data, I would still need to upload the entire thing again with each change.
Not really sure which way to go here.
Perhaps I should just… upload the entire blog each time I want to update my progress?