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

Make tags metadata optional per page #72

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ruralocity
Copy link

After upgrading Jekyll from 1.1.2j to 3.8.3 and jekyll-tagging from 1.0.1 to
1.1.0, having pages with no tags metadata causes builds to fail:

$ jekyll build
Configuration file: /Users/asumner/code/everyday-rails/_config.yml
Source: /Users/asumner/code/everyday-rails
Destination: ./_site

Incremental build: disabled. Enable with --incremental
Generating...
Liquid Exception: undefined method first' for nil:NilClass in /_layouts/post.html jekyll 3.8.3 | Error: undefined method first' for nil:NilClass

Fix by making the tags metadata optional per page. If the "tags" option isn't
found, don't try to make a tags list.

After upgrading Jekyll from 1.1.2j to 3.8.3 and jekyll-tagging from 1.0.1 to
1.1.0, having pages with no tags metadata causes builds to fail:

	$ jekyll build
	Configuration file: /Users/asumner/code/everyday-rails/_config.yml
    Source: /Users/asumner/code/everyday-rails
    Destination: ./_site
  Incremental build: disabled. Enable with --incremental
  Generating...
	Liquid Exception: undefined method `first' for nil:NilClass in /_layouts/post.html
	jekyll 3.8.3 | Error:  undefined method `first' for nil:NilClass

Fix by making the tags metadata optional per page. If the "tags" option isn't
found, don't try to make a tags list.
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

Successfully merging this pull request may close these issues.

1 participant