Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

better hugo version help #615

Open
apreshill opened this issue Apr 20, 2021 · 0 comments
Open

better hugo version help #615

apreshill opened this issue Apr 20, 2021 · 0 comments
Labels
next to consider for next release

Comments

@apreshill
Copy link
Contributor

From my troubleshooting help diaries-

> blogdown::install_hugo()
The latest Hugo version is v0.82.0
----------------------------------------------------------------------------------------------------
You have set the option 'blogdown.hugo.version' to '0.82' (perhaps in .Rprofile), but you are installing the Hugo version '0.82.0' now. You may want to update the option 'blogdown.hugo.version' accordingly.
----------------------------------------------------------------------------------------------------
trying URL 'https://github.com/gohugoio/hugo/releases/download/v0.82.0/hugo_extended_0.82.0_macOS-64bit.tar.gz'
Content type 'application/octet-stream' length 15013690 bytes (14.3 MB)
==================================================
downloaded 14.3 MB

Hugo has been installed to "/Users/lowndes/Library/Application Support/Hugo/0.82.0". 
> blogdown:::serve_site()
Error: Hugo 0.82 not found. You may try blogdown::install_hugo("0.82").

This person didn't realize that Hugo versions need the trailing dot (so 0.82 is not equal to 0.82.0; this doesn't help!)- can the message that prints be clearer? Suggestion:

You have set the option 'blogdown.hugo.version' to '0.82' (perhaps in .Rprofile), but you are installing the Hugo version '0.82.0' now. You may want to update the option 'blogdown.hugo.version' accordingly.

Instead to be more actionable:

You are installing Hugo version '0.82.0' now. 
● [TODO] To match your installed version, set `options(blogdown.hugo.version = "0.82.0")` in your .Rprofile.

And then maybe serve_site() could hint if the Hugo version is >= 0.54.0, that valid Hugo versions include two decimals?

@yihui yihui added the next to consider for next release label Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next to consider for next release
Projects
None yet
Development

No branches or pull requests

2 participants