diff --git a/general/src/composables/README.md.ts b/general/src/composables/README.md.ts index a3438d3..37eebd1 100644 --- a/general/src/composables/README.md.ts +++ b/general/src/composables/README.md.ts @@ -72,6 +72,7 @@ function buildBadges( repo: repoBadge = false, coverage: coverageBadge = false, license: licenseBadge = false, + discord: discordBadgeHref, } = options ?? {}; const badges: Badge[] = []; @@ -118,6 +119,15 @@ function buildBadges( }); } + if (typeof discordBadgeHref === 'string') { + badges.push({ + title: 'Discord', + image: + 'https://img.shields.io/badge/chat-discord-5662f6?style=flat-square', + url: discordBadgeHref, + }); + } + return badges; function requireRepositorySpecifier(): string { diff --git a/general/src/library/boilerplate.ts b/general/src/library/boilerplate.ts index b3166cb..8f7b20e 100644 --- a/general/src/library/boilerplate.ts +++ b/general/src/library/boilerplate.ts @@ -37,6 +37,7 @@ const BadgesOptions = x.object({ repo: x.boolean.optional(), coverage: x.boolean.optional(), license: x.boolean.optional(), + discord: x.string.optional(), }); export type BadgesOptions = x.TypeOf;