11module Jekyll
22 module Archives
3- class Archive
4- include Convertible
3+ class Archive < Jekyll ::Page
54
6- attr_accessor :posts , :type , :name , :slug
7- attr_accessor :data , :content , :output
8- attr_accessor :path , :ext
9- attr_accessor :site
5+ attr_accessor :posts , :type , :slug
106
117 # Attributes for Liquid templates
12- ATTRIBUTES_FOR_LIQUID = %w[
8+ ATTRIBUTES_FOR_LIQUID = %w(
139 posts
1410 type
1511 title
@@ -18,7 +14,7 @@ class Archive
1814 path
1915 url
2016 permalink
21- ]
17+ ) . freeze
2218
2319 # Initialize a new Archive page
2420 #
@@ -151,17 +147,6 @@ def date
151147 end
152148 end
153149
154- # Obtain destination path.
155- #
156- # dest - The String path to the destination dir.
157- #
158- # Returns the destination file path String.
159- def destination ( dest )
160- path = Jekyll . sanitized_path ( dest , URL . unescape_path ( url ) )
161- path = File . join ( path , "index.html" ) if url =~ /\/ $/
162- path
163- end
164-
165150 # Obtain the write path relative to the destination directory
166151 #
167152 # Returns the destination relative path String.
@@ -183,11 +168,6 @@ def regenerate?
183168 def inspect
184169 "#<Jekyll:Archive @type=#{ @type . to_s } @title=#{ @title } @data=#{ @data . inspect } >"
185170 end
186-
187- # Returns the Boolean of whether this Page is HTML or not.
188- def html?
189- true
190- end
191171 end
192172 end
193173end
0 commit comments