developer-content
developer-content copied to clipboard
[workflow]add workflow to check link validation
Problem:
Some links may be invalid in the markdown files.
Summary of Changes:
- Added file check-links.yaml to .github/workflows.
related issue
https://github.com/solana-foundation/developer-content/issues/12
This is a good idea! There seems to be some false positives though:
FILE: ./docs/index.md
...
[✖] /docs/core/programs
But https://solana.com/docs/core/programs exists. Do you know why this is?
Separately: rather than listing what works, it's better to only list what has failed. That allows us to scan test results and find failures very quickly.
This is a good idea! There seems to be some false positives though:
FILE: ./docs/index.md ... [✖] /docs/core/programsBut https://solana.com/docs/core/programs exists. Do you know why this is?
Separately: rather than listing what works, it's better to only list what has failed. That allows us to scan test results and find failures very quickly.
The checker determines the validity of a link based on whether it can be accessed successfully. When it checks /docs/core/programs, it tries to visit /docs/core/programs, but this fails.
This behavior is inconsistent with the expected check of the address https://solana.com/docs/core/programs.
I’ve added a configuration file that replaces links starting with / with https://solana.com/docs/core/. For example, /docs/core/programs will be replaced with https://solana.com/docs/core/programs. This should give you the expected result.
Also, I have set the checker to quiet mode, so it will only output the invalid links.
Is there anything else you’d like to configure? For example, ignore certain links...
When it checks /docs/core/programs, it tries to visit /docs/core/programs, but this fails.
This took me a while to understand, but I think you're saying -
When it checks /docs/core/programs, it tries to visit
:// /docs/core/programs, but this fails.
is that correct?
This pull request has been automatically marked as stale because it has not had recent activity. Remove stale label or comment or this will be closed in 7 days.