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

Check links on build #54

Open
nate-double-u opened this issue Oct 21, 2020 · 7 comments
Open

Check links on build #54

nate-double-u opened this issue Oct 21, 2020 · 7 comments
Labels
enhancement New feature or request

Comments

@nate-double-u
Copy link
Contributor

nate-double-u commented Oct 21, 2020

We should check that links in our site don't 404 when we do a PR.

If we agree, here is an option:

I'm happy for other suggestions.

@nate-double-u nate-double-u added the enhancement New feature or request label Oct 21, 2020
@nate-double-u
Copy link
Contributor Author

@nate-double-u
Copy link
Contributor Author

I've tested the plugin with a hugo-netlify-starter fork:
nate-double-u/testing-template#4

@nate-double-u
Copy link
Contributor Author

All I needed to do was install the plugin, and add the plugin info to the netlify.toml file.

@nate-double-u
Copy link
Contributor Author

I'm not super happy that when the link checker fails, all checks fail and that merging isn't blocked...
Screen Shot 2020-10-21 at 1 00 25 PM

I'd rather the link check come up as a separate line item that has a detail link like the others so the committer doesn't have to open the Netlify Deploy logs to get the details. But that may be my own lack of knowledge of Netlify setup (is there a way to add a check to the list I'm missing?)

@sagikazarmark
Copy link
Member

Not sure how the plugin works, but we could use a GitHub Action to check links. I'm pretty sure that either the plugin or a similar tool could validate links in the generated HTML.

@nate-double-u
Copy link
Contributor Author

I think I'd rather use a GitHub action, the Netlify plugin seems pretty opaque. I'll do some research on the GitHub action and see if it's got a better developer experience.

@nabokihms
Copy link
Member

Added a Makefile command to check links
#172

The tool itself is pretty popular, probably we can just run this check on CI periodically.

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

No branches or pull requests

3 participants