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.
Note: It can take up to 10 minutes for changes to your site to publish after you push the changes to GitHub. If you don't see your GitHub Pages site changes reflected in your browser after an hour, see "About Jekyll build errors for GitHub Pages sites."
Go to your index. html file through your site (example.github.io/index.html) and then reload the page. Then you can go back to (example.github.io) and it should have updated. You can do the same with the master.
gh-pages
branch._layouts
index.html
to _layouts
_layouts/index.html
replace the the inner html of the contents section with {{content}}
index.md
index.md
prepend the following to index.md
---
layout: index
---
_config.yml
include the following in _config.yml
:
markdown: kramdown
kramdown:
auto_ids: true
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.md
from 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 adding varname:your text
to the header of your index.md
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With