今天學(xué)習(xí)blogdown建靜態(tài)網(wǎng)頁(yè)、
按照書中的流程走下來:Rstudio--New project--New Directory--Website using blogdown
在https://themes.gohugo.io/上看到一個(gè)比較順眼的主題(github地址在https://github.com/CaiJimmy/hugo-theme-stack):

image.png
但是在build website的時(shí)候(可以點(diǎn)擊Build欄Build Website,也可以使用
blogdown::build_site()函數(shù))出現(xiàn)了錯(cuò)誤:
批注 2020-12-29 223533.png
可以看到報(bào)錯(cuò)信息的ERROR中是由于連不上twitter的API導(dǎo)致的
再看下面紅色的報(bào)錯(cuò)信息,貌似問題出在
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的信息,將這個(gè)文件刪除就可以正常bulid website了
blogdown::serve_site()

image.png