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

Fix .File.UniqueID on zero object warning #372

Merged
merged 1 commit into from
Mar 9, 2020
Merged

Fix .File.UniqueID on zero object warning #372

merged 1 commit into from
Mar 9, 2020

Conversation

helfper
Copy link
Contributor

@helfper helfper commented Feb 11, 2020

Fixes this warning:

WARN 2020/02/11 23:27:49 .File.UniqueID on zero object. Wrap it in if or with: {{ with .File }}{{ .UniqueID }}{{ end }}

Related issues: #329, #350

@laroche
Copy link

laroche commented Mar 6, 2020

This patch did not remove the warning emssage for me.

best regards,

Florian La Roche

@matalo33 matalo33 added the bug label Mar 9, 2020
@matalo33 matalo33 added this to the v2.5.0 milestone Mar 9, 2020
@matalo33
Copy link
Contributor

matalo33 commented Mar 9, 2020

Resolves the warning for me and confirmed the WARN is no longer in the wercker build output @ https://app.wercker.com/matcornic/hugo-theme-learn/runs/build/5e433bd17b63df001ada3867?step=5e433be4ee64ed00085f0fa3

Thank you!

@matalo33 matalo33 merged commit f7847b6 into matcornic:master Mar 9, 2020
@helfper helfper deleted the fix-file-zero-object-warn branch March 9, 2020 17:41
flavio-fernandes added a commit to flavio-fernandes/ovn-website that referenced this pull request Mar 17, 2020
Avoid warning message when hgo is building the site:

Building sites … WARN 2020/03/10 15:05:30 .File.UniqueID on zero object.
Wrap it in if or with: {{ with .File }}{{ .UniqueID }}{{ end }}

cherry picked from  matcornic/hugo-theme-learn#372
flavio-fernandes added a commit to flavio-fernandes/submariner-website that referenced this pull request Mar 17, 2020
Avoid warning message when hugo is building the site:

Building sites … WARN 2020/03/10 15:05:30 .File.UniqueID on zero object.
Wrap it in if or with: {{ with .File }}{{ .UniqueID }}{{ end }}

cherry picked from  matcornic/hugo-theme-learn#372
flavio-fernandes added a commit to flavio-fernandes/ovn-website that referenced this pull request Mar 17, 2020
Avoid warning message when hugo is building the site:

Building sites … WARN 2020/03/10 15:05:30 .File.UniqueID on zero object.
Wrap it in if or with: {{ with .File }}{{ .UniqueID }}{{ end }}

cherry picked from  matcornic/hugo-theme-learn#372
tpantelis pushed a commit to submariner-io/submariner-website that referenced this pull request Mar 18, 2020
Avoid warning message when hugo is building the site:

Building sites … WARN 2020/03/10 15:05:30 .File.UniqueID on zero object.
Wrap it in if or with: {{ with .File }}{{ .UniqueID }}{{ end }}

cherry picked from  matcornic/hugo-theme-learn#372

Co-authored-by: Flavio Fernandes <flaviof@redhat.com>
@pavelanni
Copy link

For those who hit this page searching for the .File.UniqueID ... warning. Like @laroche I kept getting this warning even when running the latest version of the theme (Nov 2022). I got rid of them only when I discovered that in my about folder under content there was no _index.md file but only author.md. I renamed it to _index.md and the warning disappeared.

@sylasprime94
Copy link

sylasprime94 commented Nov 20, 2022

@pavelanni's suggestion above got rid of the waning for me. Looks like every directory needs to have an _index.md.

@rickdgray
Copy link

Thank you @pavelanni

maxatome pushed a commit to maxatome/hugo-theme-learn that referenced this pull request Jan 23, 2024
maxatome pushed a commit to maxatome/hugo-theme-learn that referenced this pull request Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants