Need help understanding ignoreErrors and ignoreLogs

I have a section that cascades a page param to all pages in that section, then certain pages are overriding the value.

Because of this, I get the following warning in my terminal:

WARN  Hugo front matter key "foo" is overridden in params section.
You can suppress this warning by adding the following to your site configuration:
ignoreLogs = ['warning-frontmatter-params-overrides']

So, I added ignoreLogs: ['warning-frontmatter-params-overrides'] to my yaml config, but I still see the warning in my terminal.

I finally figured out it’s because I also have ignoreErrors: ["error-remote-getjson"] in the config. If I remove that line, then the params-overrides warning goes away.

If I merge them into one, the warning also goes away: ignoreErrors: ["error-remote-getjson", "warning-frontmatter-params-overrides"].

My question
Can someone help me understand why I can’t have both ignoreErrors and ignoreLogs? Also, what is the difference?


Directory structure

content/
└── section/
    β”œβ”€β”€ _index.md
    └── page.md
hugo.yaml

hugo.yaml

title: My Site
ignoreErrors: ["error-remote-getjson"]
ignoreLogs: ["warning-frontmatter-params-overrides"]

content/section/_index.md

---
title: My Section
cascade:
  params:
    foo: bar
---

content/section/page.md

---
title: My Page
params:
  foo: baz
---

The ignoreErrors configuration setting was deprecated in v0.123.0 in favor of ignoreLogs.

Ah, thank you!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.