# I would like to add some custom elements to my index.html without it being erased each time I run 'jekyll build'. Is there a way to do this?

**URL:** <https://talk.jekyllrb.com/t/i-would-like-to-add-some-custom-elements-to-my-index-html-without-it-being-erased-each-time-i-run-jekyll-build-is-there-a-way-to-do-this/6930>\
**Category:** Help\
**Created:** [January 27, 2022, 1:13am UTC](https://talk.jekyllrb.com/t/i-would-like-to-add-some-custom-elements-to-my-index-html-without-it-being-erased-each-time-i-run-jekyll-build-is-there-a-way-to-do-this/6930 "2022-01-27T01:13:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dstanecki](https://avatars.discourse-cdn.com/v4/letter/d/f6c823/32.png) [@dstanecki](https://talk.jekyllrb.com/u/dstanecki)\
**Post date:** [January 27, 2022, 1:13am UTC](https://talk.jekyllrb.com/t/i-would-like-to-add-some-custom-elements-to-my-index-html-without-it-being-erased-each-time-i-run-jekyll-build-is-there-a-way-to-do-this/6930/1 "2022-01-27T01:13:29Z")

</div>

I’m using JavaScript in conjunction with HTML to add a visitor count to my footer, doing it directly on my index.html page. If I want to add a new post and run jekyll build to add the post to the html page, it resets to default. Can I change this?

---

<div class="post-metadata">

**Author:** ![ashmaroli](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ashmaroli](https://talk.jekyllrb.com/u/ashmaroli)\
**Post date:** [January 27, 2022, 11:55am UTC](https://talk.jekyllrb.com/t/i-would-like-to-add-some-custom-elements-to-my-index-html-without-it-being-erased-each-time-i-run-jekyll-build-is-there-a-way-to-do-this/6930/2 "2022-01-27T11:55:56Z")

</div>

Never edit contents in the `_site` folder.  
Make your changes directly to the `index.html` file at the root of your project or override the layout it is using.
