refactoring for Github pages build