Closed saravanak closed 7 years ago
I think the replica is the best approach. If you find a lot of overlay, we can move that functionality into a shared location.
@saravanak How did you get on with this? Would be great to see the final code or PR request so we can look at merging.
Please re-open if you can provide.
I posted this on Stackoverflow, but no response as of now. I am not able to login to the middleman forum, hence posting this here, as this may be tagged as a 'feature'.
This question is related to
middleman-blog
. I would like to have a weekly summary of the blogs in addition to the year, month and day (optional) templates. I had a look at themiddleman-blog
extensions, which has thecalendar_pages.rb
doing this generation of calendar summaries.So the question is, which of the following options is best:
calendar_pages
extension which redefines themanipulate_resource_list
and friends? orpage_type
asyear
and iterate through them.But this has a disadvantage that for 'week' to work, the 'year' template should be used by the user. I would want to have the ability to useweek
irrespective ofyear
template being used.I am in favour of the second approach, since it adds to an existing related functionality. But I am worried by redefinition of methods. Is 'extending' calendar_pages a good practice in ruby?