feat: Allow to set alternate language(s) #318
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi, thank you for the useful package!
It almost fits my requirements fully, except one case:
For a multi-language site all alternate language links are generated automatically as they all have the same structured URL. However, if an localised version of the site does not exist or if the originally requested page does not exist either, I want to be able to remove the alternate language meta links. So that crawlers not unnecessary crawl those 404 page(s) and reducing the crawling budget on top. For the other properties in this package that's possible by setting the value to false, however this does not work for the alternate languages (append only currently, no filtering of falsy values during tag generation). Therefore, I added an possibility to set alternate language(s) and filter out falsy values thereof. Documentation and tests are provided too for this added functionality.
Looking forward to your feedback or even better, a merge and release with the feature. Thanks!