hugo - 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() 生成正确主题的预览。
解决方案
从您的 HTML 输出文件(例如index.html)来看,您错误地配置了baseURL
in config.toml
。它应该https://lf-araujo.github.io/
代替http://github.com/lf-araujo.github.io
. 该baseURL
选项记录在blogdown书的第 2.2 节中。
推荐阅读
- c - 如何使用链接器在 C 中运行可执行文件
- react-native - 方法 ViroARScene.getCameraOrientationAsync() 在旋转数组中返回奇怪的值
- python - 在 Kmeans++ 算法中选择最优质心
- reactjs - 如何在反应语音识别中设置默认输出消息?
- laravel - 将 nativescripte vue 应用程序连接到 localhost 服务器
- wix - WiX 工具集通过配置变量有条件地隐藏控制元素
- laravel - 试图获取非对象的属性“标头”(中间件角色身份验证)
- google-oauth - 将存储在 S3 存储桶中的凭据/.json 文件传递给 GoogleServiceAccountClient
- python-3.x - 如何正确使用请求异常
- javascript - 将方法放入 Express 给空数组