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

[workflow]add workflow to check link validation #370

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

flingjie
Copy link

Problem:

Some links may be invalid in the markdown files.

Summary of Changes:

  • Added file check-links.yaml to .github/workflows.

related issue

#12

@flingjie flingjie requested a review from nickfrosty as a code owner August 28, 2024 08:39
@mikemaccana
Copy link
Collaborator

mikemaccana commented Aug 28, 2024

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.

Copy link
Collaborator

@mikemaccana mikemaccana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments above.

@flingjie
Copy link
Author

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.

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...

@mikemaccana
Copy link
Collaborator

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?

Copy link
Collaborator

@mikemaccana mikemaccana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just following this up - can you please answer the comment in #370 (comment) ?

@flingjie flingjie requested a review from ZYJLiu as a code owner December 2, 2024 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants