Is ignoreFiles
one of the restrictions on a theme component?
Due diligence:
Search the forum
There does not appear to be an existing topic to address this question.
Read the docs, because they are good and a lot of work goes into them. Then read them again.
The docs for theme folders and configuration are generally helpful (and much appreciated), but unspecific about the behavior of ignoreFiles
with content in i18n/
.
Generally speaking, let us know:
what you were doing or what you tried,
I tried adding a non-translation, non-TOML file to i18n/
as part of the Kubernetes CI/CD system for PR review and approval.
what you expected
That when running hugo server
the build process would observe that:
i18n/OWNERS
matches the regex pattern in theignoreFiles
attribute in the site’sconfig.toml
](https://github.com/kubernetes/website/blob/master/config.toml#L10)- ignore
i18n/OWNERS
and build successfully
The site contains other subfolder OWNERS files (for example, content/en/OWNERS
) and renders without complaint. It is the specific addition of i18n/OWNERS
that causes the build to fail.
what actually happened
Error: Failed to load translations in file "OWNERS": failed to unmarshal OWNERS: unsupported file extension
Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you.
Repo: GitHub - kubernetes/website: Kubernetes website and documentation repo:
The specific PR: [WIP] Add i18n/OWNERS, update aliases by zacharysarah · Pull Request #10888 · kubernetes/website · GitHub
Use the --verbose switch on hugo server to produce more details on the command line including about errors.
$ hugo server --verbose
Error: "[...]/website/i18n/OWNERS:1:1": failed to load translations: failed to unmarshal OWNERS: unsupported file extension
Include the output of hugo env from the command line, or any other relevant versions.
$ hugo env
Hugo Static Site Generator v0.50/extended darwin/amd64 BuildDate: unknown
GOOS="darwin"
GOARCH="amd64"
GOVERSION="go1.11.1"