We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reference: https://discourse.gohugo.io/t/sitemap-in-single-language-website-with-en-prefix/48861
This isn't anything new.
site configuration
baseURL = 'https://example.org/' title = 'Hugo Forum Topic #48861' disableKinds = ['rss','taxonomy','term'] defaultContentLanguageInSubdir = true
content
content/ └── _index.md
published
public/ ├── en/ │ ├── index.html │ └── sitemap.xml ├── index.html └── sitemap.xml <-- this is a sitemapindex, but it points to itself
The sitemapindex should point to https://example.org/en/sitemap.xml instead of pointing to itself.
https://example.org/en/sitemap.xml
failing test
func TestFoo(t *testing.T) { t.Parallel() files := ` -- hugo.toml -- baseURL = 'https://example.org/' disableKinds = ['page','rss','section','taxonomy','term'] defaultContentLanguageInSubdir = true -- content/_index.md -- --- title: home --- ` b := hugolib.Test(t, files) b.AssertFileExists("public/sitemap.xml", true) b.AssertFileExists("public/en/sitemap.xml", true) b.AssertFileContent("public/sitemap.xml", "<loc>https://example.org/en/sitemap.xml</loc>") b.AssertFileContent("public/en/sitemap.xml", "<loc>https://example.org/en/</loc>") }
The text was updated successfully, but these errors were encountered:
hugolib: Fix sitemap index with monolingual site
422ae97
Fixes gohugoio#12266
3935faa
Fixes #12266
hugolib: Remove Site.HomeAbsURL
08db72d
It's not in use and after gohugoio#12266 it's also not corret to use on its own (use .Site.Home.Permalink).
558f74f
It's not in use and after #12266 it's also not corret to use on its own (use .Site.Home.Permalink).
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Sorry, something went wrong.
jmooring
Successfully merging a pull request may close this issue.
Reference: https://discourse.gohugo.io/t/sitemap-in-single-language-website-with-en-prefix/48861
This isn't anything new.
site configuration
content
published
The sitemapindex should point to
https://example.org/en/sitemap.xml
instead of pointing to itself.failing test
The text was updated successfully, but these errors were encountered: