-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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
fix(v1): self-host user images #3200
Conversation
Deploy preview for docusaurus-2 ready! Built with commit 4bf198d |
Some thing is missing here? the pr was approved? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, That almost looks good.
Can you please ensure all logos have clearly identifiable names? (rename the original filename if needed)
Also there's one broken path
If you could also add a check to ensure we don't add non-self-hosted logos anymore, that would be cool
For example:
users.forEach(user => {
if ( user.image.startsWith("/img/users") ) {
throw new Error("User image should be self-hosted in /img/users folder. This was not the case for " + user.image)
}
});
website-1.x/data/users.js
Outdated
infoLink: 'https://pnpm.js.org/', | ||
fbOpenSource: false, | ||
pinned: false, | ||
}, | ||
{ | ||
caption: 'Polymath Network', | ||
image: 'https://developers.polymath.network/img/text.svg', | ||
image: '/img/users/polymatch-logo.png', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how comes it's not a png?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took png image from official website https://polymath.network/
website-1.x/data/users.js
Outdated
@@ -737,7 +737,7 @@ module.exports = [ | |||
}, | |||
{ | |||
caption: 'smash.gg', | |||
image: 'https://imgur.com/eBFBDei.png', | |||
image: '/img/users/eBFBDei.png', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename it please
website-1.x/data/users.js
Outdated
@@ -317,7 +317,7 @@ module.exports = [ | |||
}, | |||
{ | |||
caption: 'Home Assistant', | |||
image: 'https://developers.home-assistant.io/img/logo-responsive.svg', | |||
image: '/img/logo-responsive.svg', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename it + fix the link (missing /users in path)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM except the image path check that shouldn't be in a comp
website-1.x/core/Showcase.js
Outdated
</div> | ||
); | ||
const Showcase = ({users}) => { | ||
users.forEach((user) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this check should be outside of the render method, at the top level
thanks! |
Motivation
(Write your motivation here.)
Improve reliability
Have you read the Contributing Guidelines on pull requests?
Yes
(Write your answer here.)
In https://docusaurus.io/en/users i saw one image not loaded.
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)
I replaced all external url to self-host all images.
Related PRs
(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)