From 98f65e03d9251b89ad8931eb146b89405dca4e19 Mon Sep 17 00:00:00 2001 From: elcoosp Date: Tue, 26 Nov 2024 18:06:16 +0100 Subject: [PATCH] fix(*): screenshot src using gh content --- core/templates.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/templates.ts b/core/templates.ts index 2888487..0a1d65a 100644 --- a/core/templates.ts +++ b/core/templates.ts @@ -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" @@ -117,7 +119,7 @@ ${ "💡 About the project", `${ images.screenshot - ? `Product screenshot\n` + ? `Product screenshot\n` : "" } ${