必须安装Go以使用Academic Hugo主题的blogdown
来源:stackoverflow
时间:2024-02-18 21:21:26 363浏览 收藏
你在学习Golang相关的知识吗?本文《必须安装Go以使用Academic Hugo主题的blogdown》,主要介绍的内容就涉及到,如果你想提升自己的开发能力,就不要错过这篇文章,大家要知道编程理论基础和实战操作都是不可或缺的哦!
描述
我想用 blogdown
建立一个个人网站,使用学术雨果主题。我几乎阅读了 blogdown 的整本书:使用 r markdown 创建网站以及一些教程,例如 allison hill 或 annie lyu 的教程。
我选择 blogdown 是因为我熟悉 rstudio 和 r 以及学术,因为参考文献中有建议选择一个维护的主题,例如学术。我按照书中的建议安装了blogdown
和hugo,并尝试通过rstudio方式安装主题:单击文件->新项目->新目录->使用blogdown的网站。如果我尝试了hugo-lithium主题,一切都进展顺利。如果我尝试学术,则会出现以下消息和错误(某些已安装的文件位于指定目录中):
congratulations! your new hugo site is created in c:\users\hp\documents\r\website. just a few more steps and you're ready to go: 1. download a theme into the same-named folder. choose a theme from https://themes.gohugo.io/ or create your own with the "hugo new theme" command. 2. perhaps you want to add some content. you can add single files with "hugo new \ . ". 3. start the built-in live server via "hugo server". visit https://gohugo.io/ for quickstart guide and full documentation. trying url 'https://github.com/wowchemy/starter-academic/archive/master.tar.gz' content length 133 bytes downloaded 4.8 mb error: we found a go.mod file in your project, but you need to install go to use it. see https://golang.org/dl/.: module "github.com/wowchemy/wowchemy-hugo-modules/wowchemy" not found; either add it as a hugo module or store it in "c:\\users\\hp\\documents\\r\\website\\themes".: module does not exist error: we found a go.mod file in your project, but you need to install go to use it. see https://golang.org/dl/.: module "github.com/wowchemy/wowchemy-hugo-modules/wowchemy" not found; either add it as a hugo module or store it in "c:\\users\\hp\\documents\\r\\website\\themes".: module does not exist error: we found a go.mod file in your project, but you need to install go to use it. see https://golang.org/dl/.: module "github.com/wowchemy/wowchemy-hugo-modules/wowchemy" not found; either add it as a hugo module or store it in "c:\\users\\hp\\documents\\r\\website\\themes".: module does not exist error in shell(cmd, mustwork = true, intern = intern) : '"hugo" convert toyaml --unsafe' execution failed with error code 65535 in addition: warning message: in untar2(tarfile, files, list, exdir) : skipping pax global extended headers
问题
我需要安装go才能使用这个主题吗? 1.1 安装没有提及任何关于 go 的内容(在2.1 静态站点和 hugo 部分下面,由我突出显示),也没有提及教程。这与主题的发布有关吗?这本书已经过时了吗?
我们喜爱雨果的原因有很多,但有几个原因最为突出。与其他静态站点生成器不同,hugo 的安装非常简单,因为它为大多数操作系统提供了一个不依赖的可执行文件。
sessioninfo
:
> sessionInfo() R version 4.0.0 (2020-04-24) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1 Matrix products: default locale: [1] LC_COLLATE=Hungarian_Hungary.1250 LC_CTYPE=Hungarian_Hungary.1250 [3] LC_MONETARY=Hungarian_Hungary.1250 LC_NUMERIC=C [5] LC_TIME=Hungarian_Hungary.1250 attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] compiler_4.0.0 bookdown_0.18 tools_4.0.0 blogdown_0.20 knitr_1.28 [6] xfun_0.13
解决方案
按照学术主题网页上的 Edit your site on your PC 文档进行操作:
在下载您的网站之前,我们首先安装 Hugo Extended 及其先决条件。
在 Windows 上:Git、OpenSSH 和 Go 必须与 Hugo Extended 一起安装。因为我已经有了Git,所以没有安装它,只有OpenSSH和Hugo Extended via Scope(以及之前的Powershell 5来安装Scope)。 Go 是通过 the Go documentaion site 中的可执行文件安装的。
此后,可以使用问题中指定的 RStudio 方法来部署学术主题。也许 blogdown 书需要更新。
注意:另外,在引用的文档中:
转换旧的学术 Kickstarter 网站 如果您有一个基于 2020 年 9 月 3 日之前创建的学术 Kickstarter 模板的现有网站,则可能需要转换为使用 Hugo 的新模块化系统。
文中关于的知识介绍,希望对你的学习有所帮助!若是受益匪浅,那就动动鼠标收藏这篇《必须安装Go以使用Academic Hugo主题的blogdown》文章吧,也可关注golang学习网公众号了解相关技术文章。
-
502 收藏
-
502 收藏
-
501 收藏
-
501 收藏
-
501 收藏
-
139 收藏
-
204 收藏
-
325 收藏
-
477 收藏
-
486 收藏
-
439 收藏
-
357 收藏
-
352 收藏
-
101 收藏
-
440 收藏
-
212 收藏
-
143 收藏
-
- 前端进阶之JavaScript设计模式
- 设计模式是开发人员在软件开发过程中面临一般问题时的解决方案,代表了最佳的实践。本课程的主打内容包括JS常见设计模式以及具体应用场景,打造一站式知识长龙服务,适合有JS基础的同学学习。
- 立即学习 542次学习
-
- GO语言核心编程课程
- 本课程采用真实案例,全面具体可落地,从理论到实践,一步一步将GO核心编程技术、编程思想、底层实现融会贯通,使学习者贴近时代脉搏,做IT互联网时代的弄潮儿。
- 立即学习 508次学习
-
- 简单聊聊mysql8与网络通信
- 如有问题加微信:Le-studyg;在课程中,我们将首先介绍MySQL8的新特性,包括性能优化、安全增强、新数据类型等,帮助学生快速熟悉MySQL8的最新功能。接着,我们将深入解析MySQL的网络通信机制,包括协议、连接管理、数据传输等,让
- 立即学习 497次学习
-
- JavaScript正则表达式基础与实战
- 在任何一门编程语言中,正则表达式,都是一项重要的知识,它提供了高效的字符串匹配与捕获机制,可以极大的简化程序设计。
- 立即学习 487次学习
-
- 从零制作响应式网站—Grid布局
- 本系列教程将展示从零制作一个假想的网络科技公司官网,分为导航,轮播,关于我们,成功案例,服务流程,团队介绍,数据部分,公司动态,底部信息等内容区块。网站整体采用CSSGrid布局,支持响应式,有流畅过渡和展现动画。
- 立即学习 484次学习