Read-in site's tags and categories attributes #137
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Jekyll::Site#tags
andJekyll::Site#categories
(introduced in Jekyll 2.0 via jekyll/jekyll@8c0e5d8) already encapsulate the exact same logic:So, we might as well just delegate to the methods in
Jekyll::Site
.However, it's not much of a concern since
Archives#tags
andArchives#categories
are called at most just once per call to theArchives#generate
method.--
*Notes:
extend Forwardable
anddef_delegators
since we're dealing with just two methods here.Jekyll::Site#post_attr_hash
is a memoized method. So there wont be additional hash allocation for each call toArchives#tags
andArchives#categories
.