From 06b6ebad0cc8b7755a747ba19a6c5ffe032376d0 Mon Sep 17 00:00:00 2001 From: Pihkaal Date: Fri, 13 Sep 2024 18:12:24 +0200 Subject: [PATCH] feat(build): provide github repo link in all situations --- build/manifestPlugin.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/build/manifestPlugin.ts b/build/manifestPlugin.ts index 358f360..100ef0b 100644 --- a/build/manifestPlugin.ts +++ b/build/manifestPlugin.ts @@ -91,10 +91,15 @@ export const manifest = (): Plugin => ({ // that's honestly not really clean but it does exactly what i need if (!repo.private) { - html = html.replace( - 'id="links">', - `>Repo •`, - ); + const repoLink = `https://github.com/pihkaal/${project}`; + if (html.includes('id="links')) { + html = html.replace( + 'id="links">', + `>Repo •`, + ); + } else { + html = html += `
\nGithub repo`; + } } html = html