File tree Expand file tree Collapse file tree 3 files changed +5
-1
lines changed
Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import metascraperTitle from 'metascraper-title'
66import { isAmazonURL , isGitHubURL } from ' ../../lib/blog-helpers.ts'
77import GithubLinkPreview from ' ./GitHubLinkPreview.astro'
88import * as interfaces from ' ../../lib/interfaces.ts'
9+ import Caption from ' ./Caption.astro'
910
1011export interface Props {
1112 block: interfaces .Block
7374 )}
7475 </div >
7576 </a >
77+ <Caption richTexts = { block .Bookmark ?.Caption ?? []} />
7678 </div >
7779 )}
7880 </>
8688 opacity: 0.7;
8789 }
8890 .bookmark {
89- display: flex ;
91+ display: block ;
9092 overflow: hidden;
9193 width: 100%;
9294 max-width: 100%;
Original file line number Diff line number Diff line change @@ -169,6 +169,7 @@ export interface Embed {
169169}
170170
171171export interface Bookmark {
172+ Caption : RichText [ ]
172173 Url : string
173174}
174175
Original file line number Diff line number Diff line change @@ -722,6 +722,7 @@ function _buildBlock(blockObject: responses.BlockObject): Block {
722722 case 'bookmark' :
723723 if ( blockObject . bookmark ) {
724724 const bookmark : Bookmark = {
725+ Caption : blockObject . bookmark . caption ?. map ( _buildRichText ) || [ ] ,
725726 Url : blockObject . bookmark . url ,
726727 }
727728 block . Bookmark = bookmark
You can’t perform that action at this time.
0 commit comments