blockly-samples
blockly-samples copied to clipboard
Add script to automate checking for broken links within Samples
Category
Plugins
Component
dev-scripts
Is your feature request related to a problem? Please describe.
In our READMEs, codelabs, and examples, we embed links to devsite. When documentation is rearranged in devsite (by refactoring folders in core or by rearranging/renaming pages) then the links become broken and need to be updated.
Describe the solution you'd like
A script that automatically checks if any links in our repo need to be fixed using a library like markdown-link-check or broken-link-checker. This would be useful to run after we update documentation as part of a Blockly core release, potentially using GitHub actions.
Describe alternatives you've considered
Same as current. Check whether links need to be fixed relevant codelabs/plugins/examples when we update documentation locations or update links when issues are filed.
Additional context
Can I try this, some guidance on getting started would be appreciated. 😄
Yup!
I think there are a few options here with varying levels of difficulty.
GitHub Action Ideally what we want is a GitHub action that runs every Thursday at 8am PST and creates an issue when it fails. The markdown-link-check above has a github action associated with it.
Potential steps:
- Create a new file in the workflows folder.
- Add a markdown link check workflow to the file.
- Update the action to be on a schedule instead of on a push.
- Create an issue if the check fails, possibly using this GitHub Action
This would be a great addition since we wouldn't have to trigger anything ourselves. However, it is a bit involved and we have limited experience with Github Actions so this route might be a bit bumpier and we wouldn't be able to help out as much.
Npm Script
You could add a script to the repository that could be run by doing something like npm run publish:testLinks
.
Potential steps:
- Create a gulp task that checks for broken links and has some output about what is broken.
- Export the task.
- Add it to the package.json so we can cal
npm run publish:testLinks
.
I would consider either of these options as completing this issue, so feel free to work on whatever option you are interested in. Let us know if you have any other questions!
I would like to work on this!
Hi! I have mostly solved this problem but am encountering a small blocker. Can someone help, please? My issue is stated here.
Thanks!
Heya @SoumyaMukhija just wondering if you're still working on this? Cool either way! Just want to check how it's going.
@BeksOmega I am! I believe I am very close to a solution. I'll get back with an update soon. Thanks for assigning me!
Can i work on this one? @BeksOmega
@nidhidanayak I'm already working on it! Sorry!
Hi, this issue has been fixed. Please review my PR at your earliest convenience!