Provide invokables for common drop query keys (#8165)

Merge pull request 8165
This commit is contained in:
Ashwin Maroli 2020-05-10 20:09:24 +05:30 committed by GitHub
parent 9f31fe1c3b
commit 88e3078a20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View File

@ -64,6 +64,18 @@ module Jekyll
result[key] = doc[key] unless NESTED_OBJECT_FIELD_BLACKLIST.include?(key)
end
end
def title
@obj.data["title"]
end
def categories
@obj.data["categories"]
end
def tags
@obj.data["tags"]
end
end
end
end

View File

@ -9,6 +9,10 @@ module Jekyll
def_delegators :@obj, :content, :dir, :name, :path, :url
private def_delegator :@obj, :data, :fallback_data
def title
@obj.data["title"]
end
end
end
end