Skip to content
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

Matrix invite Link get reported as InvalidUrlException #1050

Open
UnlimitedCookies opened this issue Nov 10, 2024 · 3 comments
Open

Matrix invite Link get reported as InvalidUrlException #1050

UnlimitedCookies opened this issue Nov 10, 2024 · 3 comments
Labels

Comments

@UnlimitedCookies
Copy link

I am unsure whether they are valid URIs, but the check fails for links like https://matrix.to/#/#roomname:matrix.my-cool-server.com with an InvalidUrlException.

@UnlimitedCookies
Copy link
Author

(this is probably an upstream bug, but I am unsure where to report upstream)

@UnlimitedCookies
Copy link
Author

It seems like matrix is using non-compliant URIs (matrix-org/matrix.to#17)
Is there a way to remove this one error (like writing an <-- #[allow(InvalidUrlException)] --> in the line above)?

@LaurentRDC
Copy link
Collaborator

If matrix uses non-compliant URIs, there nothing to do currently.

Good news though, Hakyll considers URIs to be strings at first, which are then parsed. If someone was really keen on supporting matrix URIs, then Hakyll could be extended to either:

  1. Have a special rule to parse matrix URIs (modifying this function);
  2. As you mention, add a mechanism to skip the check on certain URIs.

Personally, I am much more partial to solution 1 (handling matrix URIs in a special case). It seems the least disruptive and the most in-keeping with the spirit of ensuring live links.

I am happy to review pull requests.

In the meantime, you can skip checking of external uris using the mysite check --internal-links command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants