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

feat: onBrokenMarkdownAssets config option to catch bad asset paths without failing #5909

Closed
wants to merge 7 commits into from

Conversation

Josh-Cena
Copy link
Collaborator

Motivation

Resolve #3992. This config option is used for both links and images as they are treated in pretty much the same fashion.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

TODO

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Nov 8, 2021
@Josh-Cena Josh-Cena added the pr: new feature This PR adds a new API or behavior. label Nov 8, 2021
@netlify
Copy link

netlify bot commented Nov 8, 2021

✔️ [V2]

🔨 Explore the source changes: 2f45d8b

🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/61f3b28e64a4160008b6431c

😎 Browse the preview: https://deploy-preview-5909--docusaurus-2.netlify.app

@github-actions
Copy link

github-actions bot commented Nov 8, 2021

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 71
🟢 Accessibility 100
🟢 Best practices 93
🟢 SEO 100
🟢 PWA 92

Lighthouse ran on https://deploy-preview-5909--docusaurus-2.netlify.app/

@github-actions
Copy link

github-actions bot commented Nov 8, 2021

Size Change: +31 B (0%)

Total Size: 755 kB

Filename Size Change
website/build/assets/js/main.********.js 573 kB +31 B (0%)
ℹ️ View Unchanged
Filename Size
website/.docusaurus/globalData.json 47 kB
website/build/assets/css/styles.********.css 105 kB
website/build/index.html 30.1 kB

compressed-size-action

@Josh-Cena
Copy link
Collaborator Author

Not sure what should happen if the path doesn't exist though: should it still be require? Or should it stay as-is?

@slorber
Copy link
Collaborator

slorber commented Nov 10, 2021

Not sure what should happen if the path doesn't exist though: should it still be require? Or should it stay as-is?

If you convert it to require and it doesn't exist, it will fail the build anyway so using anything other than 'throw' will lead to log + error.

Not sure how to easily test for this without a site fixture or E2E test

@Josh-Cena
Copy link
Collaborator Author

Closing. To be resolved after #6370

@Josh-Cena Josh-Cena closed this Mar 31, 2022
@Josh-Cena Josh-Cena deleted the jc/onbrokenmarkdownassets branch March 31, 2022 06:42
@Josh-Cena Josh-Cena added pr: new feature This PR adds a new API or behavior. and removed pr: new feature This PR adds a new API or behavior. labels Apr 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: new feature This PR adds a new API or behavior.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

onBrokenMarkdownImagePaths to catch bad paths without failing build
3 participants