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

"undefined method 'strip' " error when a list is empty #259

Open
michaeldickens opened this issue Mar 14, 2024 · 0 comments
Open

"undefined method 'strip' " error when a list is empty #259

michaeldickens opened this issue Mar 14, 2024 · 0 comments

Comments

@michaeldickens
Copy link

When trying to migrate my website from jekyll-paginate to jekyll-paginate-v2, I ran into this error:

jekyll-paginate-v2/autopages/utils.rb:61:in `block (2 levels) in ap_index_posts_by': undefined method `strip' for nil (NoMethodError)

I discovered that the issue was I had a page with this config at the top:

categories:
-

Because the category entry was empty, Jekyll read it as nil. AutoPages then tried to read this nil value as if it was a string. This should be fixable by adding this line to utils.rb:61:

next if key.nil?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant