ppoffice / hexo-theme-hueman

A redesign of Alx's wordpress theme Hueman, ported to Hexo.
http://ppoffice.github.io/hexo-theme-hueman/
GNU General Public License v2.0
1.17k stars 336 forks source link

.gitIgnore Needs updated #249

Closed ccapasso01 closed 5 years ago

ccapasso01 commented 5 years ago

Please make sure these boxes are checked before submitting your issue. Thank you!

Maybe I'm missing something but after following the documentation and renaming _config.yml.example in the theme folder to _config.yml the site would not render properly or load.

After looking around I found that inside of .gitignore you have _config.yml. Once removed, this solved the issue. As such, I just want to confirm if .gitignore needs updated as well as your readme or if I am missing something?

ppoffice commented 5 years ago

@ccapasso01 The reason _config.yml is in .gitignore is to prevent I from uploading the _config.yml to the repository. This will avoid overwriting the existing _config.yml customized by the user every time he/she does a git pull or git merge. Of course, you can always fork the repository and remove that line from the ignore file if you want to sync your configurations.

ccapasso01 commented 5 years ago

But that _config.yml file is in the theme dir and needed for the theme to specify its configuration. Without it, the site doesn't load properly (unless I am mistaken). When the user needs to push to the repo, doesn't that file need to be there?

ppoffice commented 5 years ago

@ccapasso01 Sometimes people just build their site locally and push the built files to their servers. In this case, you do not need to upload your _config.yml. However, if you are using some automatic building processes, you can always uncomment the _config.yml from .gitignore. The point here is making sure the updates in this public repo don't change user's local _config.yml.

ccapasso01 commented 5 years ago

Good points. Only suggestion I would have would be to maybe put a note in your readme/documentation that if you are trying to push this repo as is (after modifying _config.yml) that you will need to update .gitignore.

For example, I followed your guide, renamed _config.yml.example as instructed and when I pushed to GitHub/GitLab, my site didn't work. For newer people (like myself), it would be helpful to know that .gitignore may need updated as well.

Thank you for all your work on this theme by the way 👍

ppoffice commented 5 years ago

@ccapasso01 Thank you for the suggestion. I have updated the wiki for installation.