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

Add warn message when running docsy v0.7.0 with hugo versions < v0.110 #1591

Closed
deining opened this issue Jun 24, 2023 · 3 comments
Closed
Labels
dependencies Pull requests that update a dependency file

Comments

@deining
Copy link
Collaborator

deining commented Jun 24, 2023

As of docsy version v0.7.0, hugo v0.110.0 is required as minimum version (as mentioned in the change log). This requirement might not be obvious to newbies and lead to frustration, as clearly stated in this issue comment.

Proof of failure:

  • Clone the example repo
  • run ´hugo server (with hugo version 0.100)

This is what you get:

Start building sites … 
hugo v0.100.0-27b077544d8efeb85867cb4cfb941747d104f765+extended linux/amd64 BuildDate=2022-05-31T08:37:12Z VendorInfo=gohugoio
Error: Error building site: "/home/andreas/doscy-test/content/en/_index.md:5:1": failed to extract shortcode: template for shortcode "blocks/cover" not found
Built in 15 ms

This message is not helpful at all, so we should add additional an additional warn message (or even an throw an error) in case of older hugo versions.
To make things worse, folks using an older version of Hugo will not be able to use Hugo's --config flag to get around this:

$ hugo_0.100.0 server --config hugo
hugo: downloading modules …
hugo: collected modules in 16905 ms
WARN 2023/06/24 22:43:49 Module "github.com/google/docsy-example" is not compatible with this Hugo version; run "hugo mod graph" for more information.
WARN 2023/06/24 22:43:49 Module "github.com/google/docsy" is not compatible with this Hugo version; run "hugo mod graph" for more information.
Error: from config: failed to resolve output format "print" from site config

Not sure what is the best way to tackle this issue, but IMHO, we should react on this in order to avoid frustration for docsy newbies.

@chalin: WDYT?

@chalin
Copy link
Collaborator

chalin commented Jun 26, 2023

I don't think that we can resolve this in Docsy. I've tested various approaches and none of them work: that is, the error mentioned above "failed to extract shortcode: template for shortcode "blocks/cover" not found" gets hit first.

If this is to be resolved, for the benefit of newbies, I think it will need to be in the example repo.

/cc @geriom

@chalin
Copy link
Collaborator

chalin commented Jun 26, 2023

@deining, if you agree, please close this issue. I've created the following:

@chalin
Copy link
Collaborator

chalin commented Nov 8, 2023

I don't think that we can resolve this in Docsy.

I still believe that to be the case, and we've added a check to the Docsy example via:

So I'm going to close this issue. Feel free to open if you know of a solution that will allow us to push this test onto projects.

@chalin chalin closed this as completed Nov 8, 2023
@chalin chalin added the dependencies Pull requests that update a dependency file label Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

2 participants