Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug with sitemap output #111

Open
momon opened this issue Sep 28, 2023 · 0 comments
Open

bug with sitemap output #111

momon opened this issue Sep 28, 2023 · 0 comments

Comments

@momon
Copy link

momon commented Sep 28, 2023

I am guessing this is a bug as it doesn't make sense it would be intentional, but when you use the sitemap shortcode:

[[!SeoSuiteSitemap? &contexts=`web,es` &allowSymlinks=`0`]]

I was getting a duplicate english entry as alternate links. I was expecting one of them to be x-default. So digging into the code I found that [[+locale]] actually contains x-default declaration for the default context which would fix the error. However, by default the chunk on alternate links is using

hreflang="[[+cultureKey]]"

So I worked around it by creating my own chunk and adding a bit of logic in it like so:

<xhtml:link rel="alternate" hreflang="[[+locale:is=`x-default`:then=`x-default`:else=`[[+cultureKey]]`]]" href="[[+url]]"/>

This gives me the intended output but I figure I would post it here in case someone comes across a similar issue.

Again I am not sure if that is intentional or not as we have a highly customized website and thus it might be something specific to our environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant