I’m a newbie in web development and I followed the steps to get the site running in local with a theme I selected. When I try uploading the site folder to Github, I see that not all folders are actually uploaded and the site doesn’t work as expected (like it does in local). I’m not sure what am I missing and I tried going thru the documents for no avail. May be I’m overlooking something or not looking in the right place or could be something else. I’m really hoping to get some help here in getting me started with my first website.
However, I find it much easier to use a GUI like sourcetree or the git features built into the atom text editor (your favourite editor may well have git features built-in).
I tried doing it manually and also tried using Tower Git to do it and it still won’t work. The main folder is Git enabled but the folders within are not in git (they don’t even show up as untracked). When I tried adding them manually Using Git add command it still won’t work. I don’t get an error but nothing happens.
Start over. Start a test site, to test uploading a functioning site to GitHub. Once you’ve gone through it a couple of times you’ll begin to understand what each step is doing. And you need to learn git and GitHub on your own, we can’t help with those.
Thanks. Figured that the empty directories were not being added so added them by adding a .gitignore file in each one of them. After which the structure on my local now matches the remote. Nevertheless, the local works fine but the remote is still not working.
Ok - git doesn’t track empty directories - that’s the design. You can see this by looking at your resources directory. On github, all the empty directories under resources are greyed out until you get down to the sass directory.
So now it’s time for the next problem. What do you mean that ‘remote isn’t working’? Where are you trying to host your site? Based on the baseURL setting in your config file, my guess is you want to host on github pages. Have you followed the instructions for doing this?
After running hugo , push your master branch to the remote repository and choose the docs/ folder as the website source of your repo.
What this means is on your local machine you need to run the hugo command (not hugo server). This will build your site inside the docs folder (which is currently empty). When you push to GitHub, GitHub Pages will publish the files inside the docs as your live website.
Thanks for the help!! It’s finally is getting close. The site is being severed now after running “hugo” command. Its not rendering exactly though. I see a loader/spinner instead of content.
Good lord!! Finally it’s working now!! Seems so simple yet I had a rather steep learning curve. But I’m happy I am able to take away something at least. Many many thanks to you for your continual help and support in getting this up and running!! I would also like to thank the community in general for extending their help.