Skip to content

Can't reference links to docs from Blog #3250

@danon

Description

@danon

🐛 Bug Report

After update to 2.0-alpha61, the "broken links" util (which I find very helpful), said my link to doc from Blog was broken:

Have you read the Contributing Guidelines on issues?

Yes

To Reproduce

(Write your steps here:)

  1. Add docs file, e.g. file.mdx.
  2. Add blog post
  3. Add link to your doc in Blog post with extension (e.g. file.mdx, like me)
  4. Build the application

Expected behavior

The link should be considered a valid link.

Actual Behavior

"Broken links" complain it's broken. It will only be considered valid, if it doesn't contain an extension. It's inconsitent, since link in docs to docs can have extensions.

Kinda looks like links in /docs can point to files, but links in blog point to URL? It's really unintuitive.

Error: Broken links found!

- Page path = /blog:
   -> link to ../../docs/filter.mdx#filter-by-keys (resolved as: /docs/filter.mdx)


- Page path = /blog/2019/08/31/super-duper-stargazers:
   -> link to ../../docs/filter.mdx#filter-by-keys (resolved as: /blog/2019/docs/filter.mdx)

Note: it's possible to ignore broken links with the 'onBrokenLinks' Docusaurus configuration.

Your Environment

  • Docusaurus version used: 2.0-alpha61
  • Operating system: Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its execution

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions