美文网首页
blogdown Failed to get JSON reso

blogdown Failed to get JSON reso

作者: 吴涛_631b | 来源:发表于2020-12-29 22:46 被阅读0次

    今天学习blogdown建静态网页、
    按照书中的流程走下来:Rstudio--New project--New Directory--Website using blogdown
    https://themes.gohugo.io/上看到一个比较顺眼的主题(github地址在https://github.com/CaiJimmy/hugo-theme-stack):

    image.png
    但是在build website的时候(可以点击Build栏Build Website,也可以使用blogdown::build_site()函数)出现了错误:
    批注 2020-12-29 223533.png
    可以看到报错信息的ERROR中是由于连不上twitter的API导致的
    再看下面红色的报错信息,貌似问题出在content/post/rich-content/index.md 里面,打开看一下:
    ---
    author: Hugo Authors
    date: "2019-03-10"
    description: A brief description of Hugo Shortcodes
    tags:
    - shortcodes
    - privacy
    title: Rich Content
    ---
    
    Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugo-s-built-in-shortcodes) for rich content, along with a [Privacy Config](https://gohugo.io/about/hugo-and-gdpr/) and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds.
    <!--more-->
    ---
    
    ## YouTube Privacy Enhanced Shortcode
    
    {{< youtube ZJthWmvUzzc >}}
    
    <br>
    
    ---
    
    ## Twitter Simple Shortcode
    
    {{< twitter_simple 1085870671291310081 >}}
    
    <br>
    
    ---
    
    ## Vimeo Simple Shortcode
    
    {{< vimeo_simple 48912912 >}}
    

    里面包含了youtube和twitter的信息,将这个文件删除就可以正常bulid website了

    blogdown::serve_site()
    
    image.png

    相关文章

      网友评论

          本文标题:blogdown Failed to get JSON reso

          本文链接:https://www.haomeiwen.com/subject/ayaqoktx.html