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

Check post.categories instead of post.category #357

Merged
merged 2 commits into from Dec 19, 2021

Conversation

ashmaroli
Copy link
Member

Since Jekyll::Document#data["categories"] is generated from doc.data["category"].
Closes #356

@ashmaroli ashmaroli requested a review from parkr December 19, 2021 13:28
Copy link
Member

@parkr parkr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation is fine! Would love to add a test to ensure singular key is tested.

expect(news_feed).to_not match "http://example.org/2015/08/08/stuck-in-the-middle.html"
expect(category_feed).to match '<title type="html">My awesome site | News</title>'
expect(category_feed).to match "http://example.org/updates/jekyll/2014/03/04/march-the-fourth.html"
expect(category_feed).to match "March the fourth!"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we cover the category: jekyll case too? The fixtures don't seem to have a post with the singular key name

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fixtures don't seem to have a post with the singular key name

The existing test on master uses a fixture post with a singular key name..

@ashmaroli ashmaroli requested a review from parkr December 19, 2021 15:38
@parkr
Copy link
Member

parkr commented Dec 19, 2021

@jekyllbot: merge +fix

@jekyllbot jekyllbot merged commit eb7f1af into jekyll:master Dec 19, 2021
jekyllbot added a commit that referenced this pull request Dec 19, 2021
@ashmaroli ashmaroli deleted the check-post-categories branch December 19, 2021 16:13
@jekyll jekyll locked and limited conversation to collaborators Dec 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom feed for categories doesn't work if it contains åäö
3 participants