Class: Aardi::Archive
Instance Attribute Summary
Attributes inherited from AbstractBlog
#key
Instance Method Summary
collapse
#metadata, #mtime, #render
Constructor Details
#initialize(posts, archive_path) ⇒ Archive
Returns a new instance of Archive.
5
6
7
8
|
# File 'lib/aardi/archive.rb', line 5
def initialize(posts, archive_path)
@posts = posts
@archive_path = archive_path
end
|
Instance Method Details
#content ⇒ Object
10
11
12
13
14
15
|
# File 'lib/aardi/archive.rb', line 10
def content
year_fmt = "| %<year>s | %<months>s \n"
month_fmt = "[ %<count>s ](#{Aardi.config[:site_url]}/%<archive_path>s/%<year>s/%<month>s/)"
"#{}#{years.map { |year| year.archive_row(year_fmt, month_fmt) }.join}"
end
|
#target_path ⇒ Object
17
|
# File 'lib/aardi/archive.rb', line 17
def target_path = "./#{@archive_path}/index.html"
|
#title ⇒ Object
19
|
# File 'lib/aardi/archive.rb', line 19
def title = Aardi.config[:blog_archive_title]
|