mirror of
https://github.com/PretendoNetwork/website.git
synced 2026-09-28 03:26:46 -05:00
feat(blog): implement shorthand for yt embeds
Co-Authored-By: mrjvs <mistrjvs@gmail.com>
This commit is contained in:
17
src/components/MdIframe/MdIframe.vue
Normal file
17
src/components/MdIframe/MdIframe.vue
Normal file
@@ -0,0 +1,17 @@
|
||||
<script lang="ts" setup>
|
||||
// eslint-disable-next-line vue/prop-name-casing -- this is gonna be used in markdown
|
||||
const { videoId } = defineProps({ 'video-id': { type: String, required: true } });
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<iframe
|
||||
width="560"
|
||||
height="315"
|
||||
:src="`https://www.youtube-nocookie.com/embed/${videoId}`"
|
||||
title="YouTube video player"
|
||||
frameborder="0"
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
|
||||
referrerpolicy="strict-origin-when-cross-origin"
|
||||
allowfullscreen
|
||||
/>
|
||||
</template>
|
||||
@@ -24,7 +24,7 @@ export default defineEventHandler(async (event) => {
|
||||
posts.forEach((post) => {
|
||||
feed.addItem({
|
||||
title: post.title,
|
||||
id: post.path,
|
||||
id: post.path,
|
||||
link: `https://pretendo.network${post.path}`,
|
||||
description: post.caption,
|
||||
author: [
|
||||
|
||||
Reference in New Issue
Block a user