gpt4 book ai didi

r - 需要安装 Go 才能使用带有 Academic Hugo 主题的 blogdown

转载 作者:行者123 更新时间:2023-12-01 22:20:26 27 4
gpt4 key购买 nike

描述
我想用blogdown建立个人网站,使用 Academic雨果主题。我几乎读完了blogdown: Creating Websites with R Markdown的整本书和几个教程,如 Allison Hill'sAnnie Lyu's .
我选择 blogdown 是因为我熟悉 RStudio、R 和 Academic,因为引用文献中有一些建议可以选择一个维护的主题,例如 Academic。我安装了 blogdown和 Hugo 按照书中的建议并尝试通过 RStudio 方式安装主题:单击文件 -> 新项目 -> 新目录 -> 使用 blogdown 的网站。如果我尝试了 Hugo-lithium 主题,那么一切都很棒。如果我尝试 Academic,则会出现以下消息和错误(在指定目录中已经安装了一些文件):

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 <THEMENAME>" command.
2. Perhaps you want to add some content. You can add single files
with "hugo new <SECTIONNAME>\<FILENAME>.<FORMAT>".
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 部分下面,由我突出显示),也没有提到教程。这与主题的发布有关吗?这本书过时了吗?

We love Hugo for many reasons, but there are a few that stand out. Unlike other static site generators, the installation of Hugo is very simple because it provides a single executable without dependencies for most operating systems.

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学术主题网页上的文档:

Before downloading your site, lets first install Hugo Extended and its prerequisites.


在 Windows 上:Git、OpenSSH 和 Go 必须安装在 Hugo Extended 旁边。因为我已经有了 Git,所以我没有安装它,只有 OpenSSH 和 Hugo Extended via Scope(以及之前的 Powershell 5 来安装 Scope)。 Go 是通过来自 the Go documentaion site 的可执行文件安装的.
之后,可以使用问题中指定的 RStudio 方法部署学术主题。也许 blogdown 书需要更新。
注意:另外,在引用文件中:

Convert an old Academic Kickstarter siteIf you have an existing site based on the Academic Kickstarter Template that was created before 3rd September 2020, it may need converting to use Hugo’s new modular system.

关于r - 需要安装 Go 才能使用带有 Academic Hugo 主题的 blogdown,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63898557/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com