I am using the Twitter Short Code and nearly every other build is failing with:
Building sites … WARN 2019/02/25 16:40:21 Timed out creating content for page "D:\\home\\site\\repository\\content\\blog\\2019-02-15-itpro-level-up.md" (.Content will be empty). This is most likely a circular shortcode content loop that should be fixed. If this is just a shortcode calling a slow remote service, try to set "timeout=30000" (or higher, value is in milliseconds) in config.toml.
Before I change the timeout I was wondering why this would crash the build of the entire page. I could understand if the short code failed to render, but it seems odd that the whole page would be lost.
This has come up before. If you want to read up on the details then please use the search button in the Forum and also search Hugo’s issue tracker on GitHub.
There was some discussion on GitHub aimed towards addressing this issue but in the end it was decided that when getJSON fails then a project’s build should also fail because this is -after all- an ERROR that needs to be fixed and not masked.
Also note that the above is a recap of the discussion (as I remember it). It is not my opinion.
My advice would be to stop fetching external assets this way.
For posterity it is always preferable to store a tweet’s JSON under /data/ and then simply call it via a shortcode as needed.