hugo教程 hugo server Failed to get JSON

今天尝试了一下静态博客 hugo , hugo的官网本身也是使用 hugo 制作的网站。安装和运行非常简单。只有两个步骤安装和运行。运行的时候出现了一个小问题,就是由于网络的原因不能启动成功。

粗暴的禁用网络连接相关的操作 #

  • 就是两个 短代码 给删除了 instagram, tweet。

baee64rt1

find . -name "*.md" | xargs sed -i '/{{< instagram/cinstagram content'
find . -name "*.md" | xargs sed -i '/{{< tweet/ctwitter content'

hugo server --bind '0.0.0.0'

  • print code
ERROR 2021/03/06 09:55:20 Failed to get JSON resource "https://api.twitter.com/1/statuses/oembed.json?id=877500564405444608&dnt=false": Get "https://api.twitter.com/1/statuses/oembed.json?id=877500564405444608&dnt=false": dial tcp 31.13.91.33:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
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 21188 ms
Error: Error building site: logged 1 error(s)