Skip to content

fix: docs asset links should follow specified docsUrl#1204

Merged
yangshun merged 1 commit intofacebook:masterfrom
marvinchin:fix-docs-asset-link
Jan 28, 2019
Merged

fix: docs asset links should follow specified docsUrl#1204
yangshun merged 1 commit intofacebook:masterfrom
marvinchin:fix-docs-asset-link

Conversation

@marvinchin
Copy link
Contributor

Motivation

Fix #1177 and #1203. Generated asset links were not following the docsUrl attribute specified in siteConfig.js. Docs assets were also placed into the docs folder in the build directory instead of following the specified docsUrl. This PR should fix these issues.

Have you read the Contributing Guidelines on pull requests?

Yes.

Test Plan

Development Environment

Set docsUrl in siteConfig.js to hello and start local server. Asset links in docs should point to /hello/assets/ASSET_NAME. Docs assets should be served from /hello/assets/ASSET_NAME. Images should be displayed on the test site.

Production Environment

Set docsUrl in siteConfig.js to hello and build the site. Asset links in docs should point to /hello/assets/ASSET_NAME. Docs assets should be served from /hello/assets/ASSET_NAME. Images should be displayed on the test site. (See https://marvinchin.github.io/docusaurus-demo/hello/doc1)

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Jan 27, 2019
@marvinchin marvinchin changed the title fix: docs asset links should follow specified docsUrl [WIP] fix: docs asset links should follow specified docsUrl Jan 27, 2019
@docusaurus-bot
Copy link
Contributor

docusaurus-bot commented Jan 27, 2019

Deploy preview for docusaurus-preview ready!

Built with commit 4d7847c

https://deploy-preview-1204--docusaurus-preview.netlify.com

@marvinchin marvinchin changed the title [WIP] fix: docs asset links should follow specified docsUrl fix: docs asset links should follow specified docsUrl Jan 27, 2019
Copy link
Contributor

@yangshun yangshun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is so awesome, thanks for investigating and fixing this @marvinchin!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Signed Facebook CLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

4 participants