Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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 link checker for Gatsby Docs #19267

Closed
muescha opened this issue Nov 5, 2019 · 26 comments
Closed

Add link checker for Gatsby Docs #19267

muescha opened this issue Nov 5, 2019 · 26 comments
Labels
help wanted Issue with a clear description that the community can help with. type: documentation An issue or pull request for improving or updating Gatsby's documentation

Comments

@muescha
Copy link
Contributor

muescha commented Nov 5, 2019

Summary

There is a plugin for a remark Link check: https://www.gatsbyjs.org/packages/gatsby-remark-check-links/

Can this also work on the Gatsby docs/Blog?

Or as a PR check?

new edit:

Ideas

  • check local links

    • add a linter to check before it is submitted
      • check if it has a local domain name (A lint rule is WIP)
      • check if local domains begin with a ., .. or /
    • allow local domain and remove local domain on build time with a transformer
  • check local anchors

    • with a linter and analyse each linked file?
    • on gatsby develop/gatsby build via a graphql query to query all headers?
  • check internal links for trailing slashes (because breadcrumbs and selected sidebar is depend on it)

    • check with linter
  • check external links

    • HEAD request
    • with blc (broken link checker)
  • check internal link files (like doc-links.yml, redirects.yml)

    • with a link checker script (like site showcase validator)

possible tools

@gatsbot gatsbot bot added the type: documentation An issue or pull request for improving or updating Gatsby's documentation label Nov 5, 2019
@github-actions
Copy link

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@github-actions
Copy link

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@github-actions github-actions bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Dec 17, 2019
@muescha
Copy link
Contributor Author

muescha commented Dec 18, 2019

any opinion about this?

as seen in the linked issues there some places where 404 exists without any notification when a PR is done...

@github-actions github-actions bot removed the stale? Issue that may be closed soon due to the original author not responding any more. label Dec 18, 2019
@muescha
Copy link
Contributor Author

muescha commented Dec 18, 2019

closing #18908 as duplicate of this Issue.
copy some comments from duplicate

Summary

It would be nice to have some link check on the gatsbyjs.org site maybe as validator while an PR or better also on gatsby develop to find old broken links

Caveeats

I know we can not find and check all links because some are generated from sourced data.

Motivation

During Hacktoberfest I see also some broken links reported. Example #18905

It would be nice to avoid broken links from beginning.

note

I don't mean the broken links reported for viewing files on github

Originally posted by @muescha in #18908 (comment)

Maybe putting something like Hyperlink into a GitHub Action could be a good solution to this so it would run similar to how the site showcase validator works right now.

Originally posted by @lannonbr in #18908 (comment)

@github-actions
Copy link

github-actions bot commented Jan 8, 2020

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@github-actions
Copy link

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@github-actions github-actions bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Aug 15, 2020
@muescha
Copy link
Contributor Author

muescha commented Aug 15, 2020

Not stale

@karlhorky
Copy link
Contributor

FYI for root-relative links with remark-validate-links I have opened an issue for that here: remarkjs/remark-validate-links#57

@github-actions github-actions bot removed the stale? Issue that may be closed soon due to the original author not responding any more. label Aug 16, 2020
@karlhorky
Copy link
Contributor

I ended up taking https://npmjs.com/package/mdx-link-checker and modifying it:

  1. now handles href, to, src props
  2. matches name as well as id for anchor checking
  3. adds index.mdx if linking to a directory
  4. check root relative links by passing in a base directory
  5. now has an ignore glob

I will open source this in the coming days / weeks.

@karlhorky
Copy link
Contributor

@github-actions
Copy link

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@github-actions github-actions bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Sep 27, 2020
@karlhorky
Copy link
Contributor

Not stale

@github-actions github-actions bot removed the stale? Issue that may be closed soon due to the original author not responding any more. label Sep 27, 2020
@github-actions
Copy link

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@github-actions github-actions bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Oct 17, 2020
@karlhorky
Copy link
Contributor

Not stale

@github-actions github-actions bot removed the stale? Issue that may be closed soon due to the original author not responding any more. label Oct 18, 2020
@github-actions
Copy link

github-actions bot commented Nov 7, 2020

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@github-actions github-actions bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Nov 7, 2020
@muescha
Copy link
Contributor Author

muescha commented Nov 7, 2020

Not stale

@github-actions github-actions bot removed the stale? Issue that may be closed soon due to the original author not responding any more. label Nov 8, 2020
@LekoArts LekoArts added help wanted Issue with a clear description that the community can help with. not stale and removed topic: website labels Nov 9, 2020
@LekoArts LekoArts closed this as completed May 4, 2021
@gatsbyjs gatsbyjs locked and limited conversation to collaborators May 4, 2021
@LekoArts LekoArts removed the not stale label May 7, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
help wanted Issue with a clear description that the community can help with. type: documentation An issue or pull request for improving or updating Gatsby's documentation
Projects
None yet
Development

No branches or pull requests

4 participants