-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Misc fixes and improvements #11940
Misc fixes and improvements #11940
Conversation
256d953
to
8526aef
Compare
Note that none of these can be set via cascade (you will get an error) Fixes gohugoio#11544
Also rename config `ignoreErrors` => `ignoreLogs` But the old still works. Closes gohugoio#9189
8526aef
to
7ea2bae
Compare
7ea2bae
to
2cb6f23
Compare
To clarify, "these" refers to |
For the release notes... Anyone who has been ignoring the ".Path when the page is backed by a file is deprecated" warning for the past two years (since v0.92.0) may encounter what they consider to be a breaking change. v0.122.0: The value returned by |
I was expecting that I'd be able to do
|
Yes, I was a little quick: This refers to kind, path, and lang only (the new values). |
This is a bit contrived, but...
The table below shows the value returned by
By indeterminate I mean: sometimes it finds the resource, and sometimes it does not (i.e., FYI, there are a couple of open issues related to case-sensitivity when matching resource filenames: |
I'm pretty sure that case is documented somewhere in my issues, but given this bundle:
The new canonical content paths for the two resources above is:
WIth that, this list:
Will still only produce 1 bundle with 1 resource. We have some deduplication and ordering of content files, but for the resources, when you have duplicates, which one you end up with is undefined. |
We detect page collisions ( What was bothersome was the inconsistent behavior from one build to the next; sometimes it finds a resource, sometimes it does not. |
Maybe, but it's not in scope for this PR.
I have never seen this issue in the wild. This very minor path normalisation is done with good intent: We already merge content from many files sources with different languages etc. Imagine when we add content from JSON, WordPress, SQL, whatnot. We need less ambiguity/complexity to prepare for ... more complexity. |
I've tested what I can think of. My only remaining question is...
|
That is incorrect. The |
This is 4 separate and (mostly) related commits. See the commit messages for details.
The one thing that may need some explaining is the addition of
kind
,path
andlang
as front matter keys, and the consolidation of the page configuration into this struct:I think the above should be complete. Note that
kind
,path
andlang
in front matter may be rare, but this is mostly a preparation for other data formats.cascade
._build
tobuild
(but both will work).