From d9610b18f83846643187a64994cbeae4368b46cd Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Thu, 9 Jun 2022 14:53:40 -0500 Subject: [PATCH] Use title for video main heading --- helpers/listing-page.js | 5 +++++ src/components/video-listing.astro | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/helpers/listing-page.js b/helpers/listing-page.js index bb47392..982f1a1 100644 --- a/helpers/listing-page.js +++ b/helpers/listing-page.js @@ -96,6 +96,11 @@ export class ListingDetails { isListingDetails = true get mainHeading () { + // Use the video title for videos + if ( this.type === 'video' ) { + return this.api.name + } + if ( this.type === 'formula' ) { return `Does ${ this.api.name } work on Apple Silicon when installed via Homebrew?` } diff --git a/src/components/video-listing.astro b/src/components/video-listing.astro index e20c158..9109897 100644 --- a/src/components/video-listing.astro +++ b/src/components/video-listing.astro @@ -28,7 +28,7 @@ const details = ensureListingDetails( listing ) slot="cover-bottom" class="page-heading h-full flex items-end md:p-4" > -

{ details.initialVideo.name }

+

{ details.mainHeading }