feat(build): provide github repo link in all situations

This commit is contained in:
Pihkaal
2024-09-13 18:12:24 +02:00
parent d2a5c62da2
commit 06b6ebad0c

View File

@@ -91,10 +91,15 @@ export const manifest = (): Plugin => ({
// that's honestly not really clean but it does exactly what i need // that's honestly not really clean but it does exactly what i need
if (!repo.private) { if (!repo.private) {
const repoLink = `https://github.com/pihkaal/${project}`;
if (html.includes('id="links')) {
html = html.replace( html = html.replace(
'id="links">', 'id="links">',
`><a href=\"https://github.com/pihkaal/${project}\">Repo</a> •`, `><a href=\"${repoLink}\">Repo</a> •`,
); );
} else {
html = html += `<br>\n<a href="${repoLink}">Github repo</>`;
}
} }
html = html html = html