I am try to upload my website folder on github and try to build with netlify buil eventually website is not build perfectly and not showing the things i add in index.html in themes folder also its not showing me a post i add (https://609a9b5a69047000082179fb--gifted-goldberg-aa4b80.netlify.app/) i try to find error but didn’t know whats wrong , its totally work fine in local
In the build report on Netlify (the one that shows you all the logs and the hugo run info) either get the share link and post here or if it’s private then copy paste THE WHOLE UNCHANGED log for the last deployment, then click the cog-wheel in the editor icon bar when you click reply to my response, then click “Hide Details” and put the debugging info between those tags. Then we can see what’s going on at Netlify.
its not shows any error at the run time
this my local view of website
after deploy on netlify (https://festive-johnson-fd4aa7.netlify.app/)
my github report for website (GitHub - p4r7h/p4r7h.gituhb.io)
netlify build log (netlify - Pastebin.com)
i notice on thing when i try to build it locally its show me that pages = 14
but when i deploy my site on netlify its shows me number of pages = 9
That debugging info has nothing about errors, so I am quite sure that you have
draft: true in your frontmatter in probably all or most of your posts. Your local
hugo server might be configured to create drafts, the LIVE environment (production) won’t create drafts. Remove the drafts-frontmatter and it might work.
If that does not work, then you will have to post your repository (not the link to the result) so we can see what is happening.
i already give a link of my repo ,!! unother how i can post my repositry and where i need to post that ?
also if we can igonre posts things then its still not working perfectly as per you see in prious result i put image of my website its looks broken totally
GitHub - p4r7h/p4r7h.gituhb.io my repository of website
draft: true. Your information is like a blackbox. You say “this does not work” without giving enough information about “this”. Right now I am working on your production page not showing content. That is because of the draft setting of the post.
There are multiple issues with your site, but your original post talks about an empty page, not about images or styles not working.
Look in your config.toml:
baseURL = "https://example.com" – Do you own the domain example.com or is it maybe, ehm, something along the lines of yoursamplename.netlify.app? Check your netlify setup and give your testsite a nice domain name (mysite.netlify.com instead of some-phrase-and-some-other-phrase.netlify.com) then add that testing name to your config.toml and see what happens.
This is why the app bundle and styles also cannot load, they don’t exist for one but even if they did the cors policy would prevent it.
"https://example.com/bundle.min.599099f1f14b78b657d524b28e10e0c5098e7cd46e9c7aed73d577068a276c3ff1bb234cbf29cb313333e83cf411727b43157c91ce5b809e2ffc81664614608e.js" is not eligible for integrity checks since it's neither CORS-enabled nor same-origin.
That’s what I mean by multiple issues. I would remove the CSP rules and get the site working and then add successively more rules to see what’s happening.
The only issue imho is that baseUrl is set to example.com, it shouldn’t be. The csp warnings are a consequence of that. Removing the security headers would, in this case, not get the site working.
- add custom domain
- make draft : false
but when i visit website looks like still site is broken
Works just fine of you go to domain you have specified as your baseUrl: https://robon.space/
It won’t work if you go to the raw Netlify domain https://festive-johnson-fd4aa7.netlify.app/ because the security headers prevent the loading of your styles and scripts from another domain (https://robon.space/) because that is a violation of your sites Content Security Policy.
The CSP is set with Netlify custom headers, most likely in a netlify.toml file in your sites root directory. You could remove the CSP headers, but I’d advise aginst that; security is a good thing.
The solution is to go to the url that you have told Hugo is the url for your site (and asset bundles).
So far i understand that i add image and social media links in statics html directly inside the themes folder that things not work in my live site ,
What is the better way to add custom things in html ?