Multiple pages from same blog article

Hi,

I’m building a blog for future events. In addition to a regular html-file, I would like to render the same page as an ics-file. What would be the best way do that?

I was thinking about having two different blogs with different names and layouts but the same source. Unfortunately that did not work

activate :blog do |blog|
blog.name = “eventarticle”
blog.prefix = “event”
blog.publish_future_dated = true
blog.permalink = “{year}/{month}/{day}/{title}.html”
blog.sources = “articles/{year}-{month}-{day}-{title}.html”
blog.layout = “eventarticle_layout”
end

activate :blog do |blog|
blog.name = “eventical”
blog.prefix = “event”
blog.publish_future_dated = true
blog.permalink = “ical/{year}/{month}/{day}/{title}.ics”
blog.sources = “articles/{year}-{month}-{day}-{title}.html”
blog.layout = “eventics_layout”
end

Because blog(‘eventarticle’) always refers to the second defintion.

So if I do

blog(‘eventarticle’).each do | article |
article.url
// should be ‘{year}/{month}/{day}/{title}.html’
// but is ‘ical/{year}/{month}/{day}/{title}.ics’
end

Then I thought about using proxy in config.rb

blog.each do | artice |
proxy “/event/ics/” + article.date + “.ics”, “partials/icalendar_layout”, :locals => { :article => article }
end

But that doesn’t work due to this error

undefined method `blog’

Is it even possible to produce two files from the same blog article?

I’d really appreciate any suggestions.