json - Accessing some files from master in gh-pages branch -
i creating github pages site project. github advises generating orphan gh-pages branch , clearing existing files branch. site work, i'll need copies of latest revisions of several json files master in gh-pages branch (and without them, jquery $.getjson() won't work, noted in this question).
it seems there (at least) 2 approaches getting files master gh-pages.
1. create gh-pages branch master , rebase gh-pages regularly.
this approach summarized here, , this answer discusses how automate process. think trouble approach history of site linked entire history of rest of repo, though history in master isn't particularly important site. gh-pages branch might end lot of content master isn't needed site.
2. use git-checkout pull needed files master gh-pages regularly.
this method involves non-traditional use of git-checkout, described here, copy files 1 branch another. branch orphan, suggested github, still include json files in master pulling them in git-checkout. hesitation approach means creating commit in gh-pages each time files updated master, seems extraneous, since history have bunch of commits "updating json files master."
i'm leaning towards not worrying commits , using approach #2, there approach should consider? there important advantages/disadvantages of approaches above might have missed?
github pages processing
once pulled publishing branch (
gh-pagesproject repository ormasteruser repository (eg : username.github.io)) site generated using jekyll processing.an other option instruct github pages not use jekyll processing copy files publishing branch. done creating
.nojekyllfile @ root of repository.
suggested process
in case idea can version both python scripts , web site files in gh-pages branch.
|-- _python_scripts | |-- script.py | |-- ... |-- index.html |-- script.js |-- dogs.json using first processing mechanism (with jekyll) result in _python_script folder being ignored publication, , other files being published.
conclusion
you have clear process commit history datas gathering, processing , presentation. project history , point of view datas history important presentation history, maybe more.
my 2 cents.
Comments
Post a Comment