New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃悰 Sitemaps generate with relative URLs in production #1438
Comments
You can see mine here |
I don't think this is a case where you've chosen to generate relative URLs, but perhaps I've not declared the URL in all places I should have? |
realted to #1438 |
In the interrim, I copied the above and placed it in layouts/_default/sitemap.xml generating the static version. Then I added my domain before each relative path, and that worked for Google. This still requires manual updating with each change, but will work until automation is done. Thanks! |
I found this is happening in my SEO links too. Re-reading the Hugo docs, I should be running hugo manually to build the production version of public, which I never did. Despite this, the RSS and sitemaps still use relative URLs. |
@joseph-allen just double checking do you have the baseurl defined? |
I've just tested this and my sitemaps are being generated correctly I'll assume it's because you haven't set the base url |
In my I had all along.
Running
Deploying that same public on netlify, clearing cache from my browser I get
Looking at Netlify logs, Netlify rebuilds with the
To fix, I just took out the build step and have to run the hugo command manually before I release. Though that's not ideal. I searched specifically for Hugo + Netlify issues and found this thread. I added a netlify.toml with the following:
Which fixed both my sitemap, RSS feed and other issues in production. Thanks @nunocoracao just failing to replicate was enough to single out netlify. |
Describe the bug
Sitemaps only generate links like
and do not contain valid links in production, where is this set?
The text was updated successfully, but these errors were encountered: