I’m having a tough time solving this issue. As per the title when I add a post following the process outlined in the Jekyll docs, my index file reverts back to a previous version.
Using Visual Studio I can revert back to a previous version of the index.HTML but as a result, I lose the latest post that the index.html references.
I realised it’s probably easier if I share my github repo and explain the issue.
I’m just using the minima theme and some custom CSS.
The problem is whenever I create a new blog in my _post folder, my index.html reverts back and I have to manually over-ride it otherwise I lose everything e.g. menu links, footers etc.
I have not made any changes to the file structure when I first created the site. So the index.html sit in the _site folder.
When I move the index.html to the root, I end up with 2 files, one at the root and the other in _site folder. Is this correct to have 2 index.html?
Where I want to get to is to create a site that will keep the key elements such as the menu links footers etc, while also reflecting any new blog posts I create.
don’t edit anything in the _site folder - just ignore that folder altogether, that is your site built by jekyll. You feed jekyll the contents of the root of your project and it compiles it and puts it in the _site folder.
So yes, you should have an index file in the root and jekyll will then create a corresponding index.html file in the _site folder.
Make sure in your root you only have one index file - sometimes people end up with an index.md and an index.html and the one will over write the other.