generate pages controller and add js sources