Failed to get JSON resource: error-remote-getjson

Hugo 啟動時無法載入 Twitter 及 Instagram Embed 的資源

在啟動 Hugo 時,會發現有無法取的 Twitter 及 Instagram 資源的狀況,導致無法測試檢視草稿文章

$ npm run start                                                                     17:37:48

> start
> hugo server --disableFastRender

Start building sites … 
ERROR 2021/11/18 17:41:36 Failed to get JSON resource "https://api.twitter.com/1/statuses/oembed.json?id=1181536841666682880&dnt=false": Failed to retrieve remote file: Not Found
If you feel that this should not be logged as an ERROR, you can ignore it by adding this to your site config:
ignoreErrors = ["error-remote-getjson"]
Built in 1452 ms
Error: Error building site: logged 1 error(s)

可以選擇忽略這樣的錯誤,在 config.toml 中加入 error-remote-getjson 去忽略這個錯誤,這樣就可以正常啟動 hugo 測試站了

# config.toml
ignoreErrors = ["error-remote-getjson"]

參考資料