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
Inconsistent behavior with Posts and user-defined collections #7296
Comments
Personally, I believe it'd benefit Jekyll if everything except the optional Frontmatter was the same between the two. In lieu of user-friendliness, we should still allow users to waive frontmatter on posts. |
Front MatterIf posts or collection documents don't have a date in their filename, we pick the date from the front matter PermalinksAs users can override permalinks for collections, we could set a different default for posts collection:
Static filesWe will have to write some common scenarios to figure out how to deal with static files in collections. Summary:
|
So Personally, I wish this part was consistent. Either require front-matter in all Since I don't want to put empty front-matter each time I create a new At the moment, I need to add empty front-matter to all my |
@kimbaudi Actually, only Jekyll uses the front matter to decide whether to consider a file as "convertable" or "non-convertable (static)" based on the presence of front natter. Posts get the leeway because of their unique filename pattern. |
@ashmaroli, both Pages and Posts do not require front matter for Unfortunately, only Collections require front matter for Since Pages and Posts (i.e., files under You seem to suggest that Pages require front matter in btw, I am using the latest "github-pages" gem, which uses jekyll v3.7.4. |
@kimbaudi I wouldn't blame you for arriving at that conclusion. But the truth is that the reason you feel so is because of this plugin automatically loaded by If you were to build a site using just plain Jekyll (any version), then you'll realize that GitHub Pages and Jekyll produce slightly different results out-of-the-box. |
@ashmaroli thank you for clarifying that jekyll-optional-front-matter is the reason why Pages do not require front matter. I will just continue to use the jekyll-optional-front-matter plugin since I really don't want to add front matter to each |
So it's not possible to use Categories and Tags for Pages ? only for Posts ? |
It would be really helpful for my site if pages, posts, and collections were treated the same, specifically the tags and categories. |
This is simply to document the different behavior with Jekyll's "default collection"
posts
and "user-defined collections"..YY(YY)-M(M)-D(D)-title.extn
_posts
can be located anywhere withinconfig["collection_dir"]
_#{label}
has to be at root ofconfig["collection_dir"]
<date>
*/:collection/:path
collection.files
The text was updated successfully, but these errors were encountered: