I created a wonderful GitHub Pages website for my little project, and I added some other pages into the gh-pages branch.
My problem is that, everytime I regenerate the website from ‘Settings=>Automatic Page Generator’, everything is cleaned up and I have to restore the files manually.
Is there a way to prevent, or work around this?
It would have been much better if the Automatic Generator was just overwriting his stuff without removing existing files.
gh-pagesbranch._layoutsindex.htmlto_layouts_layouts/index.htmlreplace the the inner html of the contents section with{{content}}index.mdindex.mdprepend the following to
index.md_config.ymlinclude the following in
_config.yml:this step is to match github’s markdown syntax
add & commit changes, and then push branch back to github.
Now you can simply edit
index.mdfrom the gh-branch in your github source browser and it will update using jekyll automatically and not mess with anything in your gh-branch.You can also make more items editable in the layout using place holder
{{page.varname}}and then addingvarname:your textto the header of yourindex.md.