-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Closed
Labels
help wantedIssue with a clear description that the community can help with.Issue with a clear description that the community can help with.type: documentationAn issue or pull request for improving or updating Gatsby's documentationAn issue or pull request for improving or updating Gatsby's documentation
Description
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
- add a linter to check before it is submitted
-
check local anchors
- with a linter and analyse each linked file?
- on
gatsby develop/gatsby buildvia 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
- https://gatsbyjs.org/packages/gatsby-remark-check-links
- https://github.com/davidtheclark/remark-lint-no-dead-urls/
- https://npmjs.com/package/mdx-link-checker
- no repo: but source @ unpkg:
- https://github.com/remarkjs/remark-validate-links
- Test: it finds some links, but just now it only checks the:
- relative links (like
[abc](docs/wronglink)but they have to be[abc](docs/rightlink.md) - but not find absolute paths like:
[abc](/docs/wronglink)[abc](https://www.gatsbyjs.org/docs/wronglink)
- relative links (like
- maybe i have to tweak settings...
- Test: it finds some links, but just now it only checks the:
- https://github.com/zslabs/remark-relative-links -> transformer to remove domains, but can only used if we use remark instead off prettier
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
help wantedIssue with a clear description that the community can help with.Issue with a clear description that the community can help with.type: documentationAn issue or pull request for improving or updating Gatsby's documentationAn issue or pull request for improving or updating Gatsby's documentation