[website] Fix user link images (#1956)

This commit is contained in:
Jim Schubert 2019-01-22 02:04:05 -05:00 committed by William Cheng
parent 2220a2ca85
commit eeb3d7765b
2 changed files with 12 additions and 1 deletions

View File

@ -142,6 +142,9 @@
"generators/go": {
"title": "generators/go"
},
"generators/graphql-nodejs-express-server": {
"title": "generators/graphql-nodejs-express-server"
},
"generators/graphql-schema": {
"title": "generators/graphql-schema"
},
@ -271,6 +274,9 @@
"generators/powershell": {
"title": "generators/powershell"
},
"generators/python-aiohttp": {
"title": "generators/python-aiohttp"
},
"generators/python-flask": {
"title": "generators/python-flask"
},
@ -355,6 +361,9 @@
"generators/typescript-node": {
"title": "generators/typescript-node"
},
"generators/typescript-rxjs": {
"title": "generators/typescript-rxjs"
},
"installation": {
"title": "CLI Installation"
},

View File

@ -24,7 +24,9 @@ class Users extends React.Component {
const editUrl = `${repoUrl}/edit/master/website/dynamic/users.yml`;
const showcase = siteConfig.users.map(user => {
let imgUrl = `${baseUrl}${user.image.startsWith("/") ? user.image : "/" + user.image}`;
// avoid joining base/ with /img/path as double-slash breaks image load.
let trimmedImg = user.image.startsWith("/") ? user.image.slice(1,user.image.length) : user.image;
let imgUrl = `${baseUrl}${trimmedImg}`;
return (
<a href={user.infoLink} key={user.infoLink}>
<img src={imgUrl} alt={user.caption} title={user.caption}/>