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

Add automation to discover broken links #217

Open
shahmishal opened this issue Jan 23, 2023 · 5 comments · May be fixed by #369
Open

Add automation to discover broken links #217

shahmishal opened this issue Jan 23, 2023 · 5 comments · May be fixed by #369
Assignees
Labels
enhancement New feature or request

Comments

@shahmishal
Copy link
Member

Its would great to add script which can discover broken links, and this can be used part of CI testing.

@0xTim
Copy link
Collaborator

0xTim commented Jan 24, 2023

FWIW in Vapor we use a Markdown link checker (https://github.com/vapor/docs/blob/main/.github/workflows/check.yml#L26) which uses https://github.com/tcort/markdown-link-check under the hood - maybe that can be pulled in for CI

ishaanbedi added a commit to ishaanbedi/swift-org-website that referenced this issue Feb 6, 2023
@ishaanbedi
Copy link
Contributor

FWIW in Vapor we use a Markdown link checker (https://github.com/vapor/docs/blob/main/.github/workflows/check.yml#L26) which uses https://github.com/tcort/markdown-link-check under the hood - maybe that can be pulled in for CI

Hi @0xTim ! I tried to work on this issue and here's the action I wrote as you suggested that works well for Vapor docs.
But I'm getting an error that even the default config file (mlc_config.json) is not recognized by the action.
Can you please guide me on how can I proceed to make things work?

@shahmishal
Copy link
Member Author

@ishaanbedi thanks for working on this! Currently, we are not accepting actions. Would it be possible to add it as script into the repo?

@ishaanbedi
Copy link
Contributor

Currently, we are not accepting actions. Would it be possible to add it as script into the repo?

Oh, okay! But I am not sure how that could be achieved since there has to be a manual trigger to run the script every time a push or a commit is made to the repo without Github actions, and that too would require manual changing of broken links since we will get only an output showing where and which link is broken.

I made this small package in swift a few months back that actually solves this issue. Can you please guide me on whether this logic can be applied to solve this issue and how it can be integrated into the repo?
Thanks.

@0xTim
Copy link
Collaborator

0xTim commented Feb 14, 2023

@ishaanbedi as long as you can call a script to check the URLs that returns a non-zero exit code if it fails, it can be integrated in to CI. See the soundness check as an example for something that gets called as part of CI

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

Successfully merging a pull request may close this issue.

4 participants