Skip to content

Commit 560cbce

Browse files
authored
docs(misc): trunk livestream (#27603)
1 parent 77cbfa0 commit 560cbce

File tree

7 files changed

+34
-1
lines changed

7 files changed

+34
-1
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: How to Fast-Track Your PRs with Trunk.io | Nx Live
3+
slug: nx-live-trunk-io
4+
authors: ['Zack DeRose']
5+
tags: [livestream]
6+
cover_image: /blog/images/2024-08-29/nx-live-trunk.png
7+
youtubeUrl: https://youtube.com/live/E8Gh-Vkxok0
8+
---
9+
10+
In this episode of Nx Live, Zack sits down with David from [Trunk.io](https://trunk.io) to explore hands-on examples of how to fast-track your PRs using Nx and Trunk Merge Queues. They also discuss the latest [first-class support for Nx](https://docs.trunk.io/merge-queue/parallel-queues/nx) recently added to Trunk, demonstrating how these tools can streamline your development workflow.
519 KB
Loading

nx-dev/data-access-documents/src/lib/blog.api.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ export class BlogApi {
6868
ogImageType: type,
6969
filePath,
7070
slug,
71+
youtubeUrl: frontmatter.youtubeUrl,
7172
podcastYoutubeId: frontmatter.podcastYoutubeId,
7273
podcastSpotifyId: frontmatter.podcastSpotifyId,
7374
podcastIHeartUrl: frontmatter.podcastIHeartUrl,

nx-dev/data-access-documents/src/lib/blog.model.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export type BlogPostDataEntry = {
1111
pinned?: boolean;
1212
filePath: string;
1313
slug: string;
14+
youtubeUrl?: string;
1415
podcastYoutubeId?: string;
1516
podcastSpotifyId?: string;
1617
podcastAmazonUrl?: string;

nx-dev/ui-blog/src/lib/blog-container.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
AcademicCapIcon,
1414
ChatBubbleOvalLeftEllipsisIcon,
1515
ListBulletIcon,
16+
VideoCameraIcon,
1617
} from '@heroicons/react/24/outline';
1718

1819
export interface BlogContainerProps {
@@ -63,6 +64,12 @@ let ALL_TOPICS = [
6364
value: 'tutorial',
6465
heading: 'Tutorials',
6566
},
67+
{
68+
label: 'Livestreams',
69+
icon: VideoCameraIcon,
70+
value: 'livestream',
71+
heading: 'Livestreams',
72+
},
6673
];
6774

6875
// first five blog posts contain potentially pinned plus the last published ones. They

nx-dev/ui-blog/src/lib/blog-details.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { BlogAuthors } from './authors';
55
import { ChevronLeftIcon } from '@heroicons/react/24/outline';
66
import { renderMarkdown } from '@nx/nx-dev/ui-markdoc';
77
import { EpisodePlayer } from './episode-player';
8+
import { YouTube } from '@nx/nx-dev/ui-common';
89

910
export interface BlogDetailsProps {
1011
post: BlogPostDataEntry;
@@ -76,6 +77,14 @@ export function BlogDetails({ post }: BlogDetailsProps) {
7677
iHeartUrl={post.podcastIHeartUrl}
7778
/>
7879
</div>
80+
) : post.youtubeUrl ? (
81+
<div className="mx-auto mb-16 w-full max-w-screen-md">
82+
<YouTube
83+
src={post.youtubeUrl}
84+
title={post.title}
85+
caption={post.description}
86+
/>
87+
</div>
7988
) : (
8089
post.cover_image && (
8190
<div className="mx-auto mb-16 aspect-[1.7] w-full max-w-screen-md">

nx-dev/ui-common/src/lib/youtube.component.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ export function computeEmbedURL(youtubeURL: string) {
3737
return 'https://www.youtube.com/embed/' + match[1];
3838
}
3939

40+
match = youtubeURL.match(/youtube\.com\/live\/([a-zA-Z0-9_-]+)/);
41+
if (match && match[1]) {
42+
return 'https://www.youtube.com/embed/' + match[1];
43+
}
44+
4045
// Check for 'https://youtu.be/' format
4146
match = youtubeURL.match(/youtu\.be\/([a-zA-Z0-9_-]+)/);
4247
if (match && match[1]) {
@@ -50,7 +55,7 @@ export function YouTube(props: {
5055
title: string;
5156
caption: string;
5257
src: string;
53-
width: string;
58+
width?: string;
5459
}): JSX.Element {
5560
return (
5661
<div className="text-center">

0 commit comments

Comments
 (0)