Fetching data from another site (upon reload/button press)?

I understand that hugo is a static site generator. However, javascript is a thing still, and so are youtube embeds. So it clearly is possible to get data from other websites… right?
I am looking to get data from external websites. Nothing fancy, tiny sizes of data, mostly some numbers, which update quite frequently. Now I understand that the sites can not change dynamically. However, would it be possible that they update and get these values again upon reload or upon hitting a certain button?
Thank you very much!

Your chances to receive a prompt and accurate answer are probably higher at places dealing with JavaScript. It has nothing to do with Hugo.

But is it possible at all?
The question is a bit of a generalisation from this post

which is an ancient post at this point.

“The short answer is: You can pull in data from external resources, but you cannot currently generate pages (i.e. URLs) from external API data (you can only include that data in other pages).
There is an open issue about this, and it will eventually happen. But time is the limit.”

Are there any updates on this? It seems to be hugo related, and limited (or nowadays enabled) by hugo.
thanks

you may

  • pull in data using GetRemote
  • generate pages and resources using Content Adapters
  • make your pages ‘dynamic’ using javascript
  • rebuild and publish as often as want
1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.