Conversation
`rel=alternate` covers two unrelated things. With `hreflang` it is this page in another language, which is a claim about the page and belongs with the canonical url. Without it — `type=application/rss+xml`, a `text/plain` llms.txt — it points at a separate file, and a file lives where the build is served. #22 sent both to `--canonical`, so a site that writes its feed link absolutely would have published a feed url on a site that does not host the feed. Nothing hit it: Effection writes those two relatively, and staticalize only rewrites urls that start with the crawl origin.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
rel=alternatecovers two unrelated things, and #22 treated them as one.With
hreflang, it is this page in another language:That is a claim about the page, so it belongs with the canonical url.
Without it, it points at a separate file:
A file lives where the build is served. Sending those to
--canonicalwouldpublish a feed url on a site that does not host the feed.
Nothing has hit this. Effection writes both of those relatively, and staticalize
only rewrites urls that start with the crawl origin, so it never touched them —
I noticed it while reading the output of thefrontside/effection#1255 rather than
from a failure.
Approach
names()splits the two cases.hreflangis the whole test, since that is whatdistinguishes a translation of this page from a different representation of it:
hrefLangis how hast spells the attribute; I checked rather than assumed.Tests
Extended the existing split test with a feed alternate, so one case now asserts
both halves of the rule:
alternate[hreflang]lands on--canonical, andalternate[type=application/rss+xml]on--base.I confirmed the assertion actually catches the old behaviour by reverting
names()and re-running:All 33 steps pass with the fix.