@@ -25,12 +25,17 @@ def initialize(site, base, subdir, lang, posts)
25
25
data [ "lang" ] = lang
26
26
data [ "posts" ] = posts . reverse
27
27
data [ "layout" ] = layout
28
+ data [ "title" ] = title
28
29
end
29
30
30
31
def layout
31
32
raise NotImplementedError
32
33
end
33
34
35
+ def title
36
+ raise NotImplementedError
37
+ end
38
+
34
39
def locales
35
40
site . data [ "locales" ] [ lang ] [ "news" ] ||
36
41
site . data [ "locales" ] [ "en" ] [ "news" ]
@@ -64,7 +69,6 @@ def initialize(site, base, lang, year, month, posts)
64
69
subdir = File . join ( year . to_s , "%.2d" % month )
65
70
super ( site , base , subdir , lang , posts )
66
71
67
- data [ "title" ] = title
68
72
data [ "year" ] = year
69
73
end
70
74
@@ -87,7 +91,6 @@ def initialize(site, base, lang, year, posts)
87
91
subdir = year . to_s
88
92
super ( site , base , subdir , lang , posts )
89
93
90
- data [ "title" ] = title
91
94
data [ "year" ] = year
92
95
93
96
months = posts . map { |post | post . date . month } . uniq
@@ -118,7 +121,6 @@ def initialize(site, base, lang, posts)
118
121
subdir = nil
119
122
super ( site , base , subdir , lang , posts )
120
123
121
- data [ "title" ] = title
122
124
data [ "posts" ] = posts . last ( MAX_POSTS ) . reverse
123
125
124
126
years = posts . map { |post | post . date . year } . uniq . reverse
0 commit comments