You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running a setup where my site is deployed to http://localhost:8081/ during my CI runs. Unlighthouse is configured to run against this url.
I also provide a sitemap which is automatically generated during build and points to the actual url https://example.com/.
The issue now is that unlighthouse will refuse to parse and use the sitemap because the origin is different (as stated by the logs). This results in all routes that nested deeper to be missed due to unlighthouse not knowing these exist.
Suggested solution
I would love to have the option to reconfigure unlighthouse so that any routes in the sitemap get re-written to match a given override. It may look similar to this:
The parameter name could be anything in this regard (sitemap_origin, sitemap_override, ...).
Alternatively, unlighthouse could automatically try to use the sitemap, replacing the origin with the given site. However, I would prefer an explicit solution over some implicit replacement.
Alternative
A current workaround is to add all possible routes to the config in advance. However, this is very tedious and doesn't scale well with sites that generate routes on the fly, for example when content collections are being used.
Additional context
Dynamically reading the links from the pages is not an option in this context, as the links are already pointing to https://example.com/ when the site finishes building.
Feel free to reach out for further details, I can provide the project infos if necessary.
The text was updated successfully, but these errors were encountered:
Clear and concise description of the problem
I am running a setup where my site is deployed to
http://localhost:8081/
during my CI runs. Unlighthouse is configured to run against this url.I also provide a sitemap which is automatically generated during build and points to the actual url
https://example.com/
.The issue now is that unlighthouse will refuse to parse and use the sitemap because the origin is different (as stated by the logs). This results in all routes that nested deeper to be missed due to unlighthouse not knowing these exist.
Suggested solution
I would love to have the option to reconfigure unlighthouse so that any routes in the sitemap get re-written to match a given override. It may look similar to this:
The parameter name could be anything in this regard (
sitemap_origin
,sitemap_override
, ...).Alternatively, unlighthouse could automatically try to use the sitemap, replacing the origin with the given site. However, I would prefer an explicit solution over some implicit replacement.
Alternative
A current workaround is to add all possible routes to the config in advance. However, this is very tedious and doesn't scale well with sites that generate routes on the fly, for example when content collections are being used.
Additional context
Dynamically reading the links from the pages is not an option in this context, as the links are already pointing to
https://example.com/
when the site finishes building.Feel free to reach out for further details, I can provide the project infos if necessary.
The text was updated successfully, but these errors were encountered: