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

Locally served site's image links are broken when docsUrl is blank #1177

Closed
will-stone opened this issue Jan 3, 2019 · 2 comments · Fixed by #1204
Closed

Locally served site's image links are broken when docsUrl is blank #1177

will-stone opened this issue Jan 3, 2019 · 2 comments · Fixed by #1204

Comments

@will-stone
Copy link

will-stone commented Jan 3, 2019

🐛 Bug Report

When the docsUrl setting is configured to put all docs in the root, i.e. docsUrl="", images that are linked to in documents using ![example](assets/example.jpg) are broken. Whereas this works fine when built/published; images are linked to correctly.

Have you read the Contributing Guidelines on issues?

Yes

To Reproduce

  1. Initialise a new Docusaurus project.
  2. Rename the example docs directory to docs.
  3. Yarn install the modules in the website directory.
  4. Delete the example blog directory.
  5. Remove the blog entry from headerLinks in website/siteConfig.js.
  6. Add docsUrl: "" setting to website/siteConfig.js.
  7. Add docs/assets directory and put an example image in there.
  8. Link to your example image in a doc document: ![example](assets/example.jpg).

Expected behavior

When running the website locally, the image should be shown.

Actual Behavior

Image link is broken when running website locally (yarn start).

Reproducible Demo

Repo:
https://github.com/will-stone/docusaurus-image-issue
Site Config:
https://github.com/will-stone/docusaurus-image-issue/blob/master/website/siteConfig.js

@will-stone
Copy link
Author

PS, thanks for all the hard work! 😄 This is a great tool and we're in the process of moving over all our company docs to Docusaurus. Let me know if I can provide any more info.

@JoelMarcey
Copy link
Contributor

cc: @yangshun @endiliey - Have you seen this issue before?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants