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

docsy userguide: warning message when building with hugo 0.92.0 #835

Closed
deining opened this issue Jan 15, 2022 · 3 comments · Fixed by #842
Closed

docsy userguide: warning message when building with hugo 0.92.0 #835

deining opened this issue Jan 15, 2022 · 3 comments · Fixed by #842

Comments

@deining
Copy link
Collaborator

deining commented Jan 15, 2022

Excerpt from the netlify build log when building docsy userguide with latest hugo version 0.92.0

10:19:03 PM: hugo v0.92.0-B3549403+extended linux/amd64 BuildDate=2022-01-12T08:23:18Z VendorInfo=gohugoio
10:19:04 PM: WARN 2022/01/15 21:19:04 .Path when the page is backed by a file is deprecated and will be removed in a future release. We plan to use Path for a canonical source path and you probably want to check the source is a file. To get the current behaviour, you can use a construct simlar to the below:
10:19:04 PM:   {{ $path := "" }}
10:19:04 PM:   {{ with .File }}
10:19:04 PM: 	{{ $path = .Path }}
10:19:04 PM:   {{ else }}
10:19:04 PM: 	{{ $path = .Path }}
10:19:04 PM:   {{ end }}
10:19:04 PM: Re-run Hugo with the flag --panicOnWarning to get a better error message.
10:19:06 PM:                    | EN
10:19:06 PM: -------------------+-----
10:19:06 PM:   Pages            | 74
10:19:06 PM:   Paginator pages  |  0
10:19:06 PM:   Non-page files   |  4
10:19:06 PM:   Static files     | 48
10:19:06 PM:   Processed images |  5
10:19:06 PM:   Aliases          |  0
10:19:06 PM:   Sitemaps         |  1
10:19:06 PM:   Cleaned          |  0
10:19:06 PM: Total in 18114 ms

We should identify the offending source file and fix it so that the warning disappears.
Unfortunately, flag --panicOnWarning is broken which makes it harder to identify this file.

@LisaFC
Copy link
Collaborator

LisaFC commented Jan 17, 2022

I'll see if I can find it (also I bet if this is a new warning it's hit lots of other Hugo sites too so might get clues from other people's issues)

@LisaFC
Copy link
Collaborator

LisaFC commented Jan 17, 2022

It looks like it's the partial with the GitHub links: https://github.com/google/docsy/blob/master/layouts/partials/page-meta-links.html

Let me see if I can figure out what bep means in the release notes about how to rewrite it....

@chalin
Copy link
Collaborator

chalin commented Jan 17, 2022

Yes, that's were it's coming from. I'll be fixing this for another project (open-telemetry/opentelemetry.io#1047), and will be glad to port the solution here if you'd like @LisaFC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants