Test optimize image
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
e05481dc9c
commit
5fec0d6bbb
10
lib/team.ts
10
lib/team.ts
|
@ -96,7 +96,7 @@ export async function getExec(name: string, pos: string, convert = true) {
|
||||||
const raw = await readFile(path.join(EXECS_PATH, `${name}${FILETYPE}`));
|
const raw = await readFile(path.join(EXECS_PATH, `${name}${FILETYPE}`));
|
||||||
({ content, data: metadata } = matter(raw));
|
({ content, data: metadata } = matter(raw));
|
||||||
|
|
||||||
const image = await getMemberImagePath(metadata.name, true);
|
const image = await getMemberImagePath(metadata.name);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
content: convert ? await serialize(content) : content,
|
content: convert ? await serialize(content) : content,
|
||||||
|
@ -114,7 +114,7 @@ export async function getExec(name: string, pos: string, convert = true) {
|
||||||
role: `${posName}`,
|
role: `${posName}`,
|
||||||
};
|
};
|
||||||
|
|
||||||
const image = await getMemberImagePath(metadata.name, true);
|
const image = await getMemberImagePath(metadata.name);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
content: convert ? await serialize(content) : content,
|
content: convert ? await serialize(content) : content,
|
||||||
|
@ -132,10 +132,8 @@ async function getImage(imgPath: string) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getMemberImagePath(name: string, currentTeam: boolean) {
|
export async function getMemberImagePath(name: string) {
|
||||||
const imgPath = currentTeam
|
const imgPath = path.join("images", "team", name.replace(" ", ""));
|
||||||
? path.join("images", "team", name.replace(" ", ""))
|
|
||||||
: path.join("images", "team", name.replace(" ", ""));
|
|
||||||
const placeholder = path.join(
|
const placeholder = path.join(
|
||||||
"images",
|
"images",
|
||||||
"team",
|
"team",
|
||||||
|
|
Loading…
Reference in New Issue