I have been reading many forum topics, but I can not find how to solve this and I do not understand how the site is deployed.
I used the theme “Resume”.
In the config.toml I have:
baseURL = “./”
languageCode = “es-es”
theme = “hugo-resume”
relativeURLS = true
I have the site on github:
and I already have the account in netlify, I followed the steps of the tutorial.
The deployment was made but when I access the site, everything is wrong, does not respect the subject or anything. The site is https://paolabruccoleri.netlify.com/
Is it necessary to create the public folder? Should I add it to the git repository? That folder what is it for? should it be added to the .gitignore?
How can this be resolved?
Thank you. I’m new to Hugo and to learn it, I made this site simple, personal.
Hi, any reason you are using relative URLs and have set your base URL to that? Netlify does not require this fyi.
I also notice you don’t have a
netlify.toml config file. Unless you are setting environment variables in your Netlify site, you’ll need one in order to specify Hugo version, etc.
The official Hugo docs have a nice resource for hosting on Netlify, check it out https://gohugo.io/hosting-and-deployment/hosting-on-netlify/
So you should set
baseURL = "https://paolabruccoleri.netlify.com/"
And no, you don’t need to have the
public folder on github. And I always have
You don’t need to set a baseURL, all is well on that front. Looking at your site and the code below it I see a lot of http://example.com/ URLs. You should search through your config and theme code to see where this is done and exchange with the real URL.
Cool - I didn’t know that…though it probably isn’t going to work setting
baseURL = http://example.com.
@pbruccoleri - it doesn’t look like you’ve used a submodule for your theme which you need to do on netlify.
thank you very much, I removed that variable
thank you very much, I removed that variable. The site now works ok, BUT, a page does not have the format of the theme:
In development mode it looks perfect but not in Netlify.
Look in HOME - Ver Licencia:
I imagine that the public folder (simply running hugo) must be created to copy all the files manually in any hosting. I tried to generate the folder, and in local mode, internal links do not work. I do not understand what is happening. I want to try that another way to generate the site.
With the changes proposed to me by the other colleagues, I managed to make the site almost functional. I only have a problem on one page. Look at the previous answer.
Yes, I followed the instructions you indicated. Only I got lost with the configuration file. When I asked for Hugo’s version, I put it on Netlify.
Because of the theme you’re using, I think you do need to specify your site’s URL in
So I think if you put
baseURL = https://paolabruccoleri.netlify.com in
config.toml, pages like https://paolabruccoleri.netlify.com/material/grooming/ will render with the correct style sheets.
The reason I’m suggesting this is because in the theme you’re using, the style sheets are loaded using
Regarding your question about the
public folder—since you’re hosting with Netlify, you don’t need to push that folder to git, as netlify builds that for you.
Now if everything works ok, thank you very much.
At first I thought not because netlify took a few minutes to show the changes.
I tried to create the public folder and host the site in miarroba.es (hosting very simple, free and without advertising), previously arranging the address in baseURL and everything is working fine. (paolabruccoleri.webcindario.com)
I appreciate the help of all colleagues.