making page generator work for different libraries