Good Evening all, thanks a lot for this amazing work.
I followed the HUGO GitHub hosting instructions and all went good and smooth.
few days later…
I updated the web page in my PC, and then I copied all the Hugo files to the folder repository. Except the config.toml file. because the one that I have in the folder repository has the right BASEURL address, to work in GitHub.
Then I started to followed your tutorial again Hugo Github hosting, hosting-and-deployment/hosting-on-github.
I did step 5 (rm -rf public) all good.
Then step 6, ($ git submodule add -b master firstname.lastname@example.org:design4Eco/design4Eco.github.io.git public), But I got this: ‘public’ already exists in the index. For me make sense because the submodule was created before.
Then I followed the rest of the instructions and everything works ok.
The problem is that I can not see the new content in the webpage hosted in github. but the repository shows the new content.
this is the link to the repo: https://github.com/design4Eco/design4Eco.github.io
What I’m doing wrong?
Thanks in advance
Hey there, I didn’t follow the hosting rules with submodules, so I’m just chiming in on something that you might find more convenient.
Instead of using the public folder, (assuming you are in your current Hugo folder in the terminal), I run hugo -d “…/projectName-public”. This outputs the “public” folder into the same parent directory as your current “dev” folder called projectName-public, that you can set up with it’s own repo. That way you can have a regular Github repo for your “dev” folder (which you can set private if you want) and another for your published “public” folder that will host the Github Pages.
To me, it looks more organized and easier to manage 2 repos as I can work on dev and be sure I’m not gonna publish accidentally by pushing changes there.
I set up a function that automates the process like so:
hugo -d “…/projectName-public”
git stage *
git commit -m “published updates”
git push origin master
@carlosdelab I checked your site and the
index.html in your repo matches the content for your live site. Were you able to solve your issue?
Hi Maiki, No I couldn’t.
I delete the old repository and creates a new one, Then I followed again the https://gohugo.io/hosting-and-deployment/hosting-on-github/ to update the changes and it went ok.
Would you explain me, what should I do know when I will need to update the content again?
Thank you Dollarman.
do you mean create another repo? Im working in C:/ Hugo / project name. then when I’m happy I copy the folders and new content to the repository folder Github/projectName/. It make sense? Then I’m trying to follow the steps described in the hugo web page.
Sorry, I don’t use GitHub. But I think the docs have a script with all the steps needed for when you update. Maybe will provide answers. Ganbatte!