Skip to content

Commit 69e91eb

Browse files
authored
Merge pull request #89 from paulrobertlloyd/remove-deprecated-defs
Merge pull request 89
2 parents 6642a32 + 551bffc commit 69e91eb

File tree

2 files changed

+0
-60
lines changed

2 files changed

+0
-60
lines changed

lib/jekyll-archives.rb

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -84,22 +84,6 @@ def enabled?(archive)
8484
end
8585
end
8686

87-
# Renders the archives into the layouts
88-
def render
89-
payload = @site.site_payload
90-
@archives.each do |archive|
91-
archive.render(@site.layouts, payload)
92-
end
93-
end
94-
95-
# Write archives to their destination
96-
def write
97-
@archives.each do |archive|
98-
archive.write(@site.dest) if archive.regenerate?
99-
archive.add_dependencies
100-
end
101-
end
102-
10387
def tags
10488
@site.post_attr_hash("tags")
10589
end

lib/jekyll-archives/archive.rb

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -89,42 +89,6 @@ def permalink
8989
data && data.is_a?(Hash) && data["permalink"]
9090
end
9191

92-
# Add any necessary layouts to this post
93-
#
94-
# layouts - The Hash of {"name" => "layout"}.
95-
# site_payload - The site payload Hash.
96-
#
97-
# Returns nothing.
98-
def render(layouts, site_payload)
99-
payload = Utils.deep_merge_hashes({
100-
"page" => to_liquid
101-
}, site_payload)
102-
103-
do_layout(payload, layouts)
104-
end
105-
106-
# Add dependencies for incremental mode
107-
def add_dependencies
108-
if defined? site.regenerator
109-
archive_path = site.in_dest_dir(relative_path)
110-
site.regenerator.add(archive_path)
111-
@posts.each do |post|
112-
site.regenerator.add_dependency(archive_path, post.path)
113-
end
114-
end
115-
end
116-
117-
# Convert this Convertible's data to a Hash suitable for use by Liquid.
118-
#
119-
# Returns the Hash representation of this Convertible.
120-
def to_liquid(attrs = nil)
121-
further_data = Hash[(attrs || self.class::ATTRIBUTES_FOR_LIQUID).map do |attribute|
122-
[attribute, send(attribute)]
123-
end]
124-
125-
Utils.deep_merge_hashes(data, further_data)
126-
end
127-
12892
# Produce a title object suitable for Liquid based on type of archive.
12993
#
13094
# Returns a String (for tag and category archives) and nil for
@@ -152,14 +116,6 @@ def relative_path
152116
path
153117
end
154118

155-
def regenerate?
156-
if defined? site.regenerator
157-
site.regenerator.regenerate?(self)
158-
else
159-
true
160-
end
161-
end
162-
163119
# Returns the object as a debug String.
164120
def inspect
165121
"#<Jekyll:Archive @type=#{@type} @title=#{@title} @data=#{@data.inspect}>"

0 commit comments

Comments
 (0)