lunasqu.ee-nuxt/pages/blog/[year]/[month]/[day]/[slug].vue

11 lines
246 B
Vue
Raw Normal View History

2022-10-16 09:37:13 +00:00
<template>
<NuxtLayout name="blog">
<BlogPost :post="post" :detail="true" />
</NuxtLayout>
</template>
<script setup lang="ts">
const route = useRoute();
const { data: post } = await useFetch(`/api/blog/${route.params.slug}`);
</script>