Static page generation

I need to generate a few pages that are used as layouts for static site generators (nanoc, Jekyll). This ensures that the appearance, nav, layout etc. are consistent across the dynamic Yii pages and the static pages. So it’s like using my Yii app to generate a couple of static pages that are actually ERB files used as layouts by subsequent tools.

For now I have a special controller that renders these as though they were pages and I use cURL to fetch them into the nanoc/Jekyll project trees.

It works but it’s a bit clunky. Do you have any better ideas for generating static pages from Yii apps?

render() method doesn’t output content but return it so instead of outputting you can save result into files. If we’re talking about console, you have to pre-configure URL manager.