# After I deleted template files in \_posts, build fails for \`gh-pages\` branch

**URL:** <https://talk.jekyllrb.com/t/after-i-deleted-template-files-in-posts-build-fails-for-gh-pages-branch/1494>\
**Category:** Help\
**Created:** [February 17, 2018, 8:40pm UTC](https://talk.jekyllrb.com/t/after-i-deleted-template-files-in-posts-build-fails-for-gh-pages-branch/1494 "2018-02-17T20:40:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![clarkinia](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/clarkinia/32/812_2.png) [@clarkinia](https://talk.jekyllrb.com/u/clarkinia)\
**Post date:** [February 17, 2018, 8:40pm UTC](https://talk.jekyllrb.com/t/after-i-deleted-template-files-in-posts-build-fails-for-gh-pages-branch/1494/1 "2018-02-17T20:40:24Z")

</div>

I have been getting a `gh-pages` branch page build error message ever since I deleted the original post files from a Jekyll template I forked (Milennial).

I am new to GitHub and Jekyll and I’ve been able to problem solve all the little things I’ve run into so far but still as a noob it may be something easy and obvious I am missing. I was able to change the css and made a couple of posts, all has been going well, until I deleted the original posts included in the template.

I haven’t been able to find the answer to this on any forums yet, and I apologize if it’s been asked already. I appreciate any help or if you can point me in the right direction.

Thank you!

Here’s a more detailed description:

I ran into a problem when I deleted the original template markdown files in the \_posts folder. Ever since I have been unable to make any updates to any site files, incl css.

When I try to make edits, I receive this email with the subject: Page build failure.

And the following info:

"The page build failed for the `gh-pages` branch with the following error:

Page build failed. For more information, see [https://help.github.com/articles/troubleshooting-github-pages-builds/.”](https://help.github.com/articles/troubleshooting-github-pages-builds/.%E2%80%9D)

Also… even though the files I deleted are not in the \_posts folder, they still appear on my blog:  
[https://github.com/Clarkinia/Queer-Auntie/tree/gh-pages/\_posts](https://github.com/Clarkinia/Queer-Auntie/tree/gh-pages/_posts)  
[https://clarkinia.github.io/Queer-Auntie/](https://clarkinia.github.io/Queer-Auntie/)

 ![59%20PM](https://canada1.discourse-cdn.com/flex030/uploads/jekyllrb/original/1X/634da30ea299b412d517585916cf34ba2c599750.png)

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [February 17, 2018, 9:35pm UTC](https://talk.jekyllrb.com/t/after-i-deleted-template-files-in-posts-build-fails-for-gh-pages-branch/1494/2 "2018-02-17T21:35:21Z")

</div>

you a have post called `new post` but posts have to start with the date and probably should have an extension at the end like .md or .html - like the other two posts you have. Try changing that to `2018-02-17-new-post.md` and see if it works.

---

<div class="post-metadata">

**Author:** ![clarkinia](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/clarkinia/32/812_2.png) [@clarkinia](https://talk.jekyllrb.com/u/clarkinia)\
**Post date:** [February 17, 2018, 9:49pm UTC](https://talk.jekyllrb.com/t/after-i-deleted-template-files-in-posts-build-fails-for-gh-pages-branch/1494/3 "2018-02-17T21:49:36Z")

</div>

Thanks for your response. Actually I should clarify that the “new post” in there is something I quickly and randomly did yesterday while troubleshooting. I should have deleted that before posting this I guess - and I will delete it now.

The other two posts are the two posts I made a couple weeks back and I used the correct format. It wasn’t until about a week ago, after I deleted the how-to posts included in the template that I ran into this page build error.

Another weird thing is that even though I deleted the how-to posts included in the template, they still show up on the blog homepage. But they are not in the \_pages folder since I deleted them. I’m guessing this has to do with forking?

> **[Home](https://clarkinia.github.io/Queer-Auntie/)**
>
> Stories, Visuals and Ideas

Any thoughts?

Thanks for your time - I’m really looking forward to learning more and getting my site up. I appreciate any help here.

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [February 17, 2018, 10:48pm UTC](https://talk.jekyllrb.com/t/after-i-deleted-template-files-in-posts-build-fails-for-gh-pages-branch/1494/4 "2018-02-17T22:48:07Z")

</div>

I’m not sure what the problem is.

I think the reason why the site shows old content is because you are getting a build error it is falling back to the last successful build.

That is not a very helpful error.

I don’t use GH pages very much so I don’t have much experience with it.

---

<div class="post-metadata">

**Author:** ![mmistakes](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/mmistakes/32/2169_2.png) [@mmistakes](https://talk.jekyllrb.com/u/mmistakes)\
**Post date:** [February 17, 2018, 11:18pm UTC](https://talk.jekyllrb.com/t/after-i-deleted-template-files-in-posts-build-fails-for-gh-pages-branch/1494/5 "2018-02-17T23:18:19Z")

</div>

Have you tried installing the GitHub Pages gem and building your site locally? It’ll give you more descriptive error messaging to help you pinpoint what the issue is.

[https://help.github.com/articles/setting-up-your-github-pages-site-locally-with-jekyll/](https://help.github.com/articles/setting-up-your-github-pages-site-locally-with-jekyll/)

---

<div class="post-metadata">

**Author:** ![clarkinia](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/clarkinia/32/812_2.png) [@clarkinia](https://talk.jekyllrb.com/u/clarkinia)\
**Post date:** [February 18, 2018, 9:03pm UTC](https://talk.jekyllrb.com/t/after-i-deleted-template-files-in-posts-build-fails-for-gh-pages-branch/1494/6 "2018-02-18T21:03:17Z")

</div>

I’m going to build the site locally thanks to your advice. Also Github support got back to me and they found that a line of code in the about file links to one of the original template posts, so that was breaking the site.

Initially my plan was to build it locally and I installed the gem. But then I wandered into the github fork territory to see if it might suit my needs and sort of wanting to know more about github. When I ran into the error message I decided to see it through in case I might learn something new. idk I think I’ve been a little too obsessed with this one quote: “No quitting half-way through because it’s not working. You get nothing from an unfinished project. You learn nothing.” Stephen J. Cannell

Thanks for the link and help.
