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

New test that checks markdown links for issues #5924

Merged
merged 15 commits into from
Dec 7, 2022

Conversation

wildmanonline
Copy link
Collaborator

@wildmanonline wildmanonline commented Dec 1, 2022

This PR introduces a test that checks all markdown links within our guides and determines if there are any issues. It also checks for duplicate aliases.

Here are the links that are ignored:

  • Correctly formatted links to external sites

Here are the types of issues that are flagged by this test:

  • Target not found (FAILURE): A link does not point to a guide or alias of a guide
  • Duplicate aliases (FAILURE): The same alias has been added to multiple guides
  • Slug mismatch (FAILURE): The guide's slug does not match the name of its parent folder
  • Contains the linode docs domain (FAILURE): A link contains linode.com/docs
  • Incorrect root (FAILURE): A link points to a guide but does not start with /docs
  • Formatting issues (FAILURE): A link contains multiple slashes or does not start with a slash.
  • Points to alias (WARNING): A link points to an alias of a guide. This is the only issue that does not result in a failure. This means we should run the update-internal-links.py script. python3 ./scripts/update-internal-links.py

Command to run script locally (when in the top level directory of your local repo):

python3 ./ci/check-links.py

Optionally add the --fix_issues argument to attempt to fix some issues. Currently the only issues it can fix are slug mismatches.

@netlify
Copy link

netlify bot commented Dec 1, 2022

Deploy Preview for nostalgic-ptolemy-b01ab8 ready!

Name Link
🔨 Latest commit 40d216b
🔍 Latest deploy log https://app.netlify.com/sites/nostalgic-ptolemy-b01ab8/deploys/638929f014c516000939546f
😎 Deploy Preview https://deploy-preview-5924--nostalgic-ptolemy-b01ab8.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Dec 1, 2022

Deploy Preview for nostalgic-ptolemy-b01ab8 ready!

Name Link
🔨 Latest commit d400c4e
🔍 Latest deploy log https://app.netlify.com/sites/nostalgic-ptolemy-b01ab8/deploys/6390b857a5d4290009f585e5
😎 Deploy Preview https://deploy-preview-5924--nostalgic-ptolemy-b01ab8.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@wildmanonline
Copy link
Collaborator Author

View the test results for the latest commit. There are several accurate failures shown that already exist in our library.

@wildmanonline wildmanonline merged commit 7dfe02c into linode:develop Dec 7, 2022
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.

2 participants