move @pages building into / rendering