rstudio / blogdown

Create Blogs and Websites with R Markdown
https://pkgs.rstudio.com/blogdown/
1.73k stars 334 forks source link

Hugo help #729

Closed giorgiatosoni closed 2 years ago

giorgiatosoni commented 2 years ago

Hi,

When running blogdown::new_site(theme = "wowchemy/starter-academic") I get the following error: _― Creating your new site | Installing Hugo The latest Hugo version is v0.103.0 trying URL 'https://github.com/gohugoio/hugo/releases/download/v0.103.0/hugo_extended_0.103.0_Windows-64bit.zip' trying URL 'https://github.com/gohugoio/hugo/releases/download/v0.103.0/hugo_extended_0.103.0_Windows-64bit.zip' trying URL 'https://github.com/gohugoio/hugo/releases/download/v0.103.0/hugo_extended_0.103.0_Windows-64bit.zip' % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 9 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 curl: (22) The requested URL returned error: 404 Error in xfun::download_file(paste0(base, zipfile), zipfile, mode = "wb", : Failed to download hugo_extended_0.103.0_Windows-64bit.zip from https://github.com/gohugoio/hugo/releases/tag/v0.103.0. Please check blogdown::hugo_installers("0.103.0") for available Hugo installers, and use the appropriate os/arch/extended arguments for blogdown::installhugo().

How can I solve this?

Thanks!!

yihui commented 2 years ago

This is due to a change in Hugo installers in v0.103.0. I'll fix it in blogdown. For now, you can install Hugo on your Windows via:

blogdown::install_hugo(os = 'windows', arch = 'amd64')

As the error message says, you can check the output of blogdown::hugo_installers("0.103.0") to see what os and arch values to use.

giorgiatosoni commented 2 years ago

This is due to a change in Hugo installers in v0.103.0. I'll fix it in blogdown. For now, you can install Hugo on your Windows via:

blogdown::install_hugo(os = 'windows', arch = 'amd64')

As the error message says, you can check the output of blogdown::hugo_installers("0.103.0") to see what os and arch values to use.

Thank you very much! Which asset should I use for OS?

yihui commented 2 years ago

You mean which value you should use for the os argument? I have told you above.

giorgiatosoni commented 2 years ago

You mean which value you should use for the os argument? I have told you above.

For *macOS sorry!

yihui commented 2 years ago

Oh I see. darwin. Normally you don't need to specify these information, because blogdown will automatically guess it. However, sometimes Hugo changes the installer names, then you'd have to manually specify the info before I adapt to the changes.

yihui commented 2 years ago

The development version should work now (you wouldn't need to specify os or arch):

remotes::install_github('rstudio/blogdown')

Thanks!

giorgiatosoni commented 2 years ago

The development version should work now (you wouldn't need to specify os or arch):

remotes::install_github('rstudio/blogdown')

Thanks!

Still giving the same error...

The latest Hugo version is v0.103.0 trying URL 'https://github.com/gohugoio/hugo/releases/download/v0.103.0/hugo_extended_0.103.0_macOS-universal.tar.gz' trying URL 'https://github.com/gohugoio/hugo/releases/download/v0.103.0/hugo_extended_0.103.0_macOS-universal.tar.gz' % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 curl: (22) The requested URL returned error: 404 Error in xfun::download_file(paste0(base, zipfile), zipfile, mode = "wb", : Failed to download hugo_extended_0.103.0_macOS-universal.tar.gz from https://github.com/gohugoio/hugo/releases/tag/v0.103.0. Please check blogdown::hugo_installers("0.103.0") for available Hugo installers, and use the appropriate os/arch/extended arguments for blogdown::install_hugo().

yihui commented 2 years ago

After you install the dev version of blogdown, you need to restart R.

> blogdown::install_hugo()
The latest Hugo version is v0.103.0
trying URL 'https://github.com/gohugoio/hugo/releases/download/v0.103.0/hugo_extended_0.103.0_darwin-universal.tar.gz'
Content type 'application/octet-stream' length 36192588 bytes (34.5 MB)
==================================================
downloaded 34.5 MB

Make sure your packageVersion('blogdown') is at least 1.12.2.