Skip to content

Commit

Permalink
Custom Hero YT Link (#2768)
Browse files Browse the repository at this point in the history
resolving homepage yt link
  • Loading branch information
isaaclombardssw authored Jan 20, 2025
1 parent 28dd93b commit b597d7a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
6 changes: 6 additions & 0 deletions components/blocks/Features/Features.template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ export const featuresTemplate: Template = {
'This is the Cloudinary Public ID, for example "tina-io/docs/quick-edit-demo".',
type: 'string',
},
{
name: 'link',
label: 'Video Link',
description: 'This is the link when the video is clicked.',
type: 'string',
},
],
},
{
Expand Down
4 changes: 3 additions & 1 deletion components/blocks/Features/Features.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ export function FeatureBlock({ data, index }) {
<>
<div className="relative w-full h-auto pb-4 group">
<a
href="https://youtube.com/tinacms"
href={
data.media[0].link ?? 'https://www.youtube.com/@TinaCMS'
}
target="_blank"
rel="noopener noreferrer"
id="play-button-overlay"
Expand Down
1 change: 1 addition & 0 deletions content/blocksPages/home.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"media": [
{
"src": "/img/docs/introduction/homepage-demo-2.webm",
"link": "https://www.youtube.com/watch?v=zRkeKSZjlyw",
"_template": "video"
}
],
Expand Down
2 changes: 1 addition & 1 deletion tina/tina-lock.json

Large diffs are not rendered by default.

0 comments on commit b597d7a

Please sign in to comment.