Skip to content

Commit

Permalink
fix(*): screenshot src using gh content
Browse files Browse the repository at this point in the history
  • Loading branch information
elcoosp committed Nov 26, 2024
1 parent 2f7d7a9 commit 98f65e0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ export const readme = async ({
linkedinUsername,
}),
)
const logoSrc =
`https://raw.githubusercontent.com/${githubUsername}/${repoName}/HEAD/${images.logo}`
const ghContentUrl = (x = "") =>
`https://raw.githubusercontent.com/${githubUsername}/${repoName}/HEAD/${x}`
const logoSrc = ghContentUrl(images.logo)
const screenshotSrc = ghContentUrl(images.screenshot)
const licenseSectionBody = license === "MIT"
? `Distributed under the MIT License. See \`LICENSE.txt\` for more information.`
: "Not declared"
Expand Down Expand Up @@ -117,7 +119,7 @@ ${
"💡 About the project",
`${
images.screenshot
? `<img src="${images.screenshot}" alt="Product screenshot" />\n`
? `<img src="${screenshotSrc}" alt="Product screenshot" />\n`
: ""
}
${
Expand Down

0 comments on commit 98f65e0

Please sign in to comment.