seotools icon indicating copy to clipboard operation
seotools copied to clipboard

feat: Allow to set alternate language(s)

Open DevDavido opened this issue 3 months ago • 3 comments

Q A
Is bugfix?
New feature? ✔️
Breaks BC?
Tests pass? ✔️

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!

DevDavido avatar Feb 10 '24 10:02 DevDavido