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

Opening a pdf link shows page not found #3337

Closed
albin-joseph-wiznet opened this issue Aug 26, 2020 · 3 comments
Closed

Opening a pdf link shows page not found #3337

albin-joseph-wiznet opened this issue Aug 26, 2020 · 3 comments
Labels
bug An error in the Docusaurus core causing instability or issues with its execution

Comments

@albin-joseph-wiznet
Copy link

albin-joseph-wiznet commented Aug 26, 2020

🐛 Bug Report

Opening a pdf link shows page not found

Have you read the Contributing Guidelines on issues?

To Reproduce

  1. Step 1. head to (https://doc.wiznet.io/docs/Product/iEthernet/W5500/datasheet)
  2. Step 2.. hit any of the following links
  • W5500 Datasheet v1.0.9 - English
  • W5500 Datasheet v1.0.9 - Korean
  1. Step 3... Reload the page makes it work fine

Expected behavior

open the pdf in the same window similar to target"_self" without reload

Actual Behavior

Page not found

Screenshot 2020-08-26 at 10 08 23 AM

Screenshot 2020-08-26 at 10 08 32 AM

@albin-joseph-wiznet albin-joseph-wiznet added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Aug 26, 2020
@fasolens
Copy link

fasolens commented Aug 26, 2020

I think it is because:
https://v2.docusaurus.io/docs/static-assets/#caveats
point 2.
I have the same issue and I set to open pdf links in new tab to workaround this.

Related issue #3309

@slorber
Copy link
Collaborator

slorber commented Aug 27, 2020

Hmmm yes we should handle this better. Actually we have already merged #3096 that should improve this but it's not yet released (probably next week).

Can you give the md code with the links declarations? And your Docusaurus version?

In the meantime you can use this:

https://v2.docusaurus.io/docs/markdown-features/#common-assets

Note you should be able to require a pdf file in static folder (no relative path needed) with require("@site/static/myPDF.pdf").default.

@slorber slorber added v2 and removed status: needs triage This issue has not been triaged by maintainers labels Aug 27, 2020
@slorber
Copy link
Collaborator

slorber commented Aug 27, 2020

Actually it was'nt exactly working as I thought, so this pr should fix it: #3347

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution
Projects
None yet
Development

No branches or pull requests

3 participants