Skip to content

better hugo version help #615

@apreshill

Description

@apreshill

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    nextto consider for next release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions