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

add SitemapGeneratedEvent #1169

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

alba2020
Copy link

Sometimes we need to do some tweaks with generated sitemap, so the event was added.

@alba2020 alba2020 requested a review from khalwat as a code owner June 29, 2022 15:15
@khalwat
Copy link
Collaborator

khalwat commented Jun 29, 2022

I'm curious what tweaks are being done to the generated sitemaps?

@alba2020
Copy link
Author

I'm curious what tweaks are being done to the generated sitemaps?

some logic regarding languages, we want rewrite some hrefs in xml

@khalwat
Copy link
Collaborator

khalwat commented Jun 29, 2022

The reason I'm asking is to determine whether or not there is something in the way SEOmatic generates the sitemaps that needs to be corrected, or whether this is a one-off special case where you need to rewrite the output?

@alba2020
Copy link
Author

alba2020 commented Jun 29, 2022

Well, in craft we have some sites in english, but for one of them we want to change the hreflang 'en' -> 'en-gb', but we don't want to change the site language, it should stay 'en'. Haven't found in SEOmatic any special config matching site language and sitemap language, so we thought we could use event hook for this.

UPD. So I think it's a kind of special case and a bit hacky.

@alba2020 alba2020 closed this Jun 29, 2022
@alba2020 alba2020 reopened this Jun 29, 2022
@khalwat
Copy link
Collaborator

khalwat commented Jun 29, 2022

Are you also then changing the hreflang meta tags manually on the corresponding pages as well?

@alba2020
Copy link
Author

Are you also then changing the hreflang meta tags manually on the corresponding pages as well?

yes

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

Successfully merging this pull request may close these issues.

None yet

2 participants