Skip to content

Commit 785e703

Browse files
committed
chore: test img src bypass in blog og
1 parent 6fce4ab commit 785e703

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

app/components/OgImage/BlogPost.vue

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ const formattedDate = computed(() => {
3535
3636
const MAX_VISIBLE_AUTHORS = 2
3737
38+
const getInitials = (name: string) =>
39+
name
40+
.split(' ')
41+
.map(n => n[0])
42+
.join('')
43+
.toUpperCase()
44+
.slice(0, 2)
45+
3846
const visibleAuthors = computed(() => {
3947
console.log('blog post 5')
4048
props.authors.map(author => {
@@ -117,13 +125,13 @@ const formattedAuthorNames = computed(() => {
117125
>
118126
<img
119127
v-if="author.avatar"
120-
:src="author.avatar"
128+
v-bind="{ src: author.avatar }"
121129
:alt="author.name"
122130
class="w-full h-full object-cover"
123131
/>
124-
<!-- <span v-else style="font-size: 20px; color: #666; font-weight: 500">
132+
<span v-else style="font-size: 20px; color: #666; font-weight: 500">
125133
{{ getInitials(author.name) }}
126-
</span> -->
134+
</span>
127135
</span>
128136
<!-- +N badge -->
129137
<span

0 commit comments

Comments
 (0)