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

Deprecate or remove path in front matter #12484

Closed
bep opened this issue May 11, 2024 · 3 comments · Fixed by #13376
Closed

Deprecate or remove path in front matter #12484

bep opened this issue May 11, 2024 · 3 comments · Fixed by #13376
Assignees
Milestone

Comments

@bep
Copy link
Member

bep commented May 11, 2024

We added it in v0.123.0 and it's not documented, so it should not be in widespread use.

So, it works, but the main problem with it, which I'm not prepared to spend time fixing, is the partial rebuild on content change logic.

This was added to prepare for "data from pages", which was a good idea, but for content filed (e.g. mypage.md), it's not.

@bep bep added this to the v0.126.0 milestone May 11, 2024
@bep bep self-assigned this May 11, 2024
@jmooring
Copy link
Member

I'd say remove it without deprecation. The kind and lang front matter values not documented either, so if you need to...

@bep bep modified the milestones: v0.126.0, v0.127.0 May 15, 2024
@bep bep modified the milestones: v0.127.0, v0.128.0 Jun 8, 2024
@bep bep modified the milestones: v0.128.0, v0.129.0 Jun 21, 2024
@bep bep modified the milestones: v0.129.0, v0.131.0 Jul 22, 2024
@bep bep modified the milestones: v0.131.0, v0.133.0 Aug 9, 2024
@bep bep modified the milestones: v0.133.0, Unscheduled Aug 29, 2024
@jmooring
Copy link
Member

I just spent a little too much time tracking this down:
https://discourse.gohugo.io/t/get-a-page-resource-by-name/53483/9

It's a uncommon problem (I think this is only the third time that I've encountered it), but I still like the idea of deprecating or removing kind, lang, and path from front matter. None are documented, other than using them with the AddPage method within a content adapter.

@bep bep modified the milestones: Unscheduled, v0.144.0 Feb 10, 2025
bep added a commit to bep/hugo that referenced this issue Feb 10, 2025
These were added to the page meta object when we implemented "pages from data", but were not meant to be used in front matter.

That is not supported, so we might as well add validation.

Fixes gohugoio#12484
bep added a commit to bep/hugo that referenced this issue Feb 10, 2025
These were added to the page meta object when we implemented "pages from data", but were not meant to be used in front matter.

That is not supported, so we might as well add validation.

Fixes gohugoio#12484
bep added a commit that referenced this issue Feb 10, 2025
These were added to the page meta object when we implemented "pages from data", but were not meant to be used in front matter.

That is not supported, so we might as well add validation.

Fixes #12484
Copy link

github-actions bot commented Mar 4, 2025

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants