HubPress / hubpress.io

A web application to build your blog on GitHub
MIT License
2.81k stars 2.63k forks source link

Prevent index.html of Blog from Refreshing #499

Closed JDsnyke closed 7 years ago

JDsnyke commented 7 years ago

So i thought about adding a few lines of code to my index.html to spruce things up a little. It turns out however, once i went to my /hubpress admin area and updated a few settings my index.html reverted to back to normal (without my additional code). I tried this several times and found it quite vexing to restore whatever i typed in earlier everytime i changed something.

Is there a way to fix it so that Hubpress updates the index.html as is instead of reverting it back to normal?

anthonny commented 7 years ago

Hi @Shurikan117, The only way to update the index.html generated is to update the template file default.hbs of your theme. To avoid merge conflicts during futur upgrade of your fork, duplicate your theme casper in something like my-casper. Modify the file default.hbs of this copy as you want Then go in the Settings of your HubPress instance and set the theme to my-casper Save and it will rebuild your site using your new theme

JDsnyke commented 7 years ago

@anthonny thanks! I'll look into it! ❤