Files
aranroig.com/frontend/app/pages/blog/[slug].vue
BinarySandia04 c105669065
All checks were successful
Build and Deploy Nuxt / build (push) Successful in 35s
Big update
2026-03-20 23:10:38 +01:00

37 lines
838 B
Vue

<script setup>
import PageHeader from '~/components/parts/PageHeader.vue';
const slug = useRoute().params.slug;
const { locale } = useI18n();
const { data: post } = await useAsyncData(`blog-${slug}`, () => {
console.log(queryCollection(`blog`).path(`/blog/${locale.value}/${slug}`).first())
return queryCollection(`blog`).path(`/blog/${locale.value}/${slug}`).first()
})
</script>
<template>
<!-- Render the blog post as Prose & Vue components -->
<PageHeader></PageHeader>
<Container>
<ContentRenderer :value="post" class="blog" />
</Container>
<Footer></Footer>
</template>
<style lang="scss">
.blog {
h2 {
a {
text-decoration: none;
color: var(--color-text);
}
}
img {
margin: auto;
display: flex;
max-height: 400px;
}
}
</style>