From e955cbd0760303f8c754d4143e1fd74c2a0bd62a Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Wed, 27 Apr 2022 13:19:25 -0500 Subject: [PATCH] Add aliases --- src/components/default-listing.astro | 4 ++++ src/components/listing/aliases.astro | 14 ++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 src/components/listing/aliases.astro diff --git a/src/components/default-listing.astro b/src/components/default-listing.astro index e19e29e..d79b20a 100644 --- a/src/components/default-listing.astro +++ b/src/components/default-listing.astro @@ -5,6 +5,8 @@ import { ListingDetails } from '~/helpers/listing-page.js' +import Aliases from '~/src/components/listing/aliases.astro' + import AllUpdatesSubscribe from '~/components/all-updates-subscribe.vue' @@ -25,6 +27,8 @@ const details = new ListingDetails( listing ) { details.subtitle } + + 1 + + +const listFormatter = new Intl.ListFormat('en', { style: 'short', type: 'disjunction' }); + +--- +{ hasMultipleAliases ? + May also be known as ${ listFormatter.format( listing.aliases, 'or' ) } +: '' }