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

[Feature] Broken Link Checker #5216

Open
dannysheridan opened this issue Nov 19, 2024 · 1 comment
Open

[Feature] Broken Link Checker #5216

dannysheridan opened this issue Nov 19, 2024 · 1 comment
Labels
product/CLI Fern's command line interface tool product/docs Fern Docs which builds and hosts a developer documentation site

Comments

@dannysheridan
Copy link
Member

Problem description

Identify broken links in Fern Docs. Throw warnings in the Fern CLI.

Why would it be useful?

SEO boost and improved navigation experience.

Additional context

It should identify that this header on the page doesn't exist and warn. (We have moved #audiences to it's own page.)

You can use [audiences in your OpenAPI Specification](/learn/api-definition/openapi/extensions#audiences), too. 
@dannysheridan dannysheridan added product/docs Fern Docs which builds and hosts a developer documentation site product/CLI Fern's command line interface tool labels Nov 19, 2024
@hkosova
Copy link

hkosova commented Nov 20, 2024

Link checker wishlist:

  • check both relative links ../../path/to/etc and root-relative links /path/to/page
  • check anchors: [...](#anchor) (within same page) and [...](anotherpage#anchor)
  • check image src - at least for ![](...) and <img src="..."> syntaxes, also in <Frame> components
  • check links to snippets <Markdown src="../path/to/snippet.mdx" />
  • check card links <Card href="...">
  • check links inside snippets:
    • check root-relative links /path/to/page, image srcs, etc.
    • relative links (../path/to/smth) in snippets are tricky because it depends on how they are resolved - relative to the snippet location or relative to the page where the snippet is used. Might be OK to not check relative links and instead advise the users to use root-relative links /path/to/page in snippets because they will be more stable.
  • check canonical-url in frontmatter
  • check redirect targets (redirects[].destination) in docs.yml, except bulk (:slug) redirects

Also if possible:

  • check links to the API endpoint pages
  • check #anchor links to individual parameters/fields/sections on API endpoint pages

Nice to have:

  • if the tool will be able to check external links, have an option to ignore external links
  • option to set the error level for broken links (error vs warning)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product/CLI Fern's command line interface tool product/docs Fern Docs which builds and hosts a developer documentation site
Development

No branches or pull requests

2 participants