-
Notifications
You must be signed in to change notification settings - Fork 291
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
Make link checker work locally; make it a test #1433
Comments
Related issue: #561 |
If we make it a test, we will have to first fix all broken links, as said in #561. Would converting util/test-links.sh to a test just work? |
No because that test is going against the live website we would need to update it so that it goes against the local running copy |
Modify it or create a new and different version that starts up a local copy and checks links? |
Yes. |
In the past, when converting things to tests that were not 100%, we've builtin skips/todos in the test for known issues, then slowly chipped away at the list until it's clear; any new things are expected to pass, this lets us get the advantage of the test without having to fix everything immediately. |
We do have now a test for links. Maybe we could extend it to actually check those links... |
Not the same kind of links. Your test is checking that mentions of things that look like URLs are in a pod link. This ask is for every link tag on the site, regardess of what the source of that link looks like. |
As a matter of fact, we can simply use the generated HTML source to check local links. |
I have done quite a lot of work on links recently. Several types of links:
For types 2 & 3, I can write a test, but it needs to be run after the html files have all been generated because we cannot determine in advance whether they will be generated (I have found errors). For type 3. I can write a test that looks at each html file, extract every Have I missed anything? |
My main concern is 3.
2... I don't quite like them. They are assuming something will stay in the
same directory.
And 3... Well, testing that their target exists is a good step, and testing
HTML directly is a good patch. But it would be much better to factor out
link-generation logic from htmlify.p6 and use _that_ to check them.
I am trying right now to check what's happened to the link to use for
#2568, and I'm down a rabbit hole... My hunch now is that it was simply set
out of thin air, but I did it and, well, I don't do (usually) do that kind
of things.
|
In reply to Coke's original Issue. I have done some research and the results are on a new page in the wiki called Actual Tests. Regarding all the file
Suggestions
|
I think there are two separate issues here
|
This is related to the LinkHealth module @antoniogamiz will be working on for GSoC, that's why I assign. |
Will track in new site at Raku/doc-website#72 |
We currently have a file called "links.txt" that is generated and then pushed out to the live site.
There is also util/test-links.sh which goes out to the site, grabs the links file, then verifies each of the links against the live file.
We should be able to verify all the internal links either against the generated HTML on disk, or against a locally running copy of the site; either way, this should probably be an xt/ test, rather than a one off script.
The text was updated successfully, but these errors were encountered: