首页 > 解决方案 > github没有选择Blogdown主题

问题描述

我已按照blogdown的说明使用 markdown 获取 GitHub 静态博客。然而,一个特定的主题并不适合它。以下 MWE 生成了一个无主题的博客:

blogdown::new_site()
file.create(".nojekyll")
blogdown::install_theme("lambdafu/hugo-finite")

然后编辑 config.toml 文件以反映我的 github.io 域。

最后,:

blogdown::build_site()
cd public
git init
git remote add origin https://github.com/lf-araujo/lf-araujo.github.io

不幸的是,这些步骤会导致创建一个无主题的网站,请参见此处。我怀疑它与自定义主题有关。

PS: blogdown::serve_site() 生成正确主题的预览。

标签: hugoblogdown

解决方案


从您的 HTML 输出文件(例如index.html)来看,您错误地配置了baseURLin config.toml。它应该https://lf-araujo.github.io/代替http://github.com/lf-araujo.github.io. 该baseURL选项记录在blogdown书的第 2.2 节中。


推荐阅读