Moved index generation code into Nikola class.