After a good amount of troubleshooting I found that the reason that several hundred of my articles were missing from the dashboard and the editing window was that front matter expects all fieldnames to be all lowercase or at least case sensitive.
Hugo doesn't have this requirement and it took me a long time to notice that the initial caps used in some front matter was causing FrontMatter to not parse the articles at all.
I'm not sure if this is a bug or not, but the behavior was surprising especially since it worked differently than Hugo does.
After a good amount of troubleshooting I found that the reason that several hundred of my articles were missing from the dashboard and the editing window was that front matter expects all fieldnames to be all lowercase or at least case sensitive.
Hugo doesn't have this requirement and it took me a long time to notice that the initial caps used in some front matter was causing FrontMatter to not parse the articles at all.
I'm not sure if this is a bug or not, but the behavior was surprising especially since it worked differently than Hugo does.
<!-- github-sync-id:1061816659 -->
It is by design done like this. As the YAML syntax is case-sensitive, and the parser as well.
The best practice for the property keys and values is to write these, is to write them lowercase. That said, we could explore options to let you configure the parser behavior for case sensitivity.
It is by design done like this. As the YAML syntax is case-sensitive, and the parser as well.
The best practice for the property keys and values is to write these, is to write them lowercase. That said, we could explore options to let you configure the parser behavior for case sensitivity.
<!-- github-comment-id:977604527 -->
The case sensitivity makes sense to me as the default (or only) behavior, and I'm ok with fixing all of mine to be consistent, but I think the larger issue was that a site that worked fine in Hugo with hundreds of posts, only showed about 25 posts in FrontMatter and there wasn't really an easy way to debug it. It took me a good while to discover that the initial caps were causing the issue. I troubleshooted several prior things I thought it might be before this and even dug around in the source code a bit.
I'm not sure what fields it looks for, but it might be a better experience to identify somewhere that there were articles found that didn't have the right fields (in this case they were just cased incorrectly) but had front matter and were parsed fine.
The case sensitivity makes sense to me as the default (or only) behavior, and I'm ok with fixing all of mine to be consistent, but I think the larger issue was that a site that worked fine in Hugo with hundreds of posts, only showed about 25 posts in FrontMatter and there wasn't really an easy way to debug it. It took me a good while to discover that the initial caps were causing the issue. I troubleshooted several prior things I thought it might be before this and even dug around in the source code a bit.
I'm not sure what fields it looks for, but it might be a better experience to identify somewhere that there were articles found that didn't have the right fields (in this case they were just cased incorrectly) but had front matter and were parsed fine.
<!-- github-comment-id:978203828 -->
Diagnostic view, that gives an overview of all project/content details
A command that allows you to align all properties (convert to lowercase or camelcase). This way, you do not have to do it manually
Two things that come to mind:
- Diagnostic view, that gives an overview of all project/content details
- A command that allows you to align all properties (convert to lowercase or camelcase). This way, you do not have to do it manually
<!-- github-comment-id:978920816 -->
I think the diagnostic view would be generally quite useful.
I'm not sure how broadly beneficial the latter one is, but I'd certainly
benefit from it.
I think the diagnostic view would be generally quite useful.
I'm not sure how broadly beneficial the latter one is, but I'd certainly
benefit from it.
<!-- github-comment-id:980123118 -->
I wrote a quick script to lower initial case my front matter keys, so closing this but agree that a diagnostics feature would be broadly helpful
I wrote a quick script to lower initial case my front matter keys, so closing this but agree that a diagnostics feature would be broadly helpful
<!-- github-comment-id:996024842 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
After a good amount of troubleshooting I found that the reason that several hundred of my articles were missing from the dashboard and the editing window was that front matter expects all fieldnames to be all lowercase or at least case sensitive.
Hugo doesn't have this requirement and it took me a long time to notice that the initial caps used in some front matter was causing FrontMatter to not parse the articles at all.
I'm not sure if this is a bug or not, but the behavior was surprising especially since it worked differently than Hugo does.
It is by design done like this. As the YAML syntax is case-sensitive, and the parser as well.
The best practice for the property keys and values is to write these, is to write them lowercase. That said, we could explore options to let you configure the parser behavior for case sensitivity.
The case sensitivity makes sense to me as the default (or only) behavior, and I'm ok with fixing all of mine to be consistent, but I think the larger issue was that a site that worked fine in Hugo with hundreds of posts, only showed about 25 posts in FrontMatter and there wasn't really an easy way to debug it. It took me a good while to discover that the initial caps were causing the issue. I troubleshooted several prior things I thought it might be before this and even dug around in the source code a bit.
I'm not sure what fields it looks for, but it might be a better experience to identify somewhere that there were articles found that didn't have the right fields (in this case they were just cased incorrectly) but had front matter and were parsed fine.
Two things that come to mind:
I think the diagnostic view would be generally quite useful.
I'm not sure how broadly beneficial the latter one is, but I'd certainly
benefit from it.
I wrote a quick script to lower initial case my front matter keys, so closing this but agree that a diagnostics feature would be broadly helpful
That's great news @spf13! If you have other requests, you know where to find me.