-
Notifications
You must be signed in to change notification settings - Fork 276
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
href for alternate aren't generated correctly #343
Comments
Hi @afuno thanks for the well explained report. I can confirm that it is expecting a full HREF and doesn't modify the alternate value at all: self[:alternates].each do |alternate|
rel = alternate[:nofollow] ? 'alternate nofollow' : 'alternate'
attributes = { :rel => rel, :href => alternate[:href].to_s }
attributes[:hreflang] = alternate[:lang].to_s if SitemapGenerator::Utilities.present?(alternate[:lang])
attributes[:media] = alternate[:media].to_s if SitemapGenerator::Utilities.present?(alternate[:media])
builder.xhtml :link, attributes
end I think probably the best thing to do here would be to prepend the |
In your case I wonder if your settings are simple enough that you can use |
Came here looking to see if this issue had been reported. It's confusing to be expected to use |
I describe the rule as shown in your documentation:
For the main URL all is well. The protocol and host for this URL will be taken from:
But the URL for alternate will look like this:
That is, there will be no part with the domain.
This is mistake? Just now I have to use a crutch:
The text was updated successfully, but these errors were encountered: