Update Pkg1 to Pkg.generate in docs solves #4500