@@ -109,6 +101,12 @@
.social-menu {
flex-direction: column;
+
+ li a {
+ display: flex;
+ gap: 5px;
+ align-items: center;
+ }
}
@media all and (max-width: 770px) {
diff --git a/pages/news/[slug].vue b/pages/news/[slug].vue
index c11bc81..090d0cc 100644
--- a/pages/news/[slug].vue
+++ b/pages/news/[slug].vue
@@ -1,12 +1,12 @@
-
+
- {{ article.title }}
+ {{ data.title }}
@@ -16,12 +16,12 @@
/>
- Posted on {{ article.created }} by {{ article.author }}
+ Posted on {{ data.created }} by {{ data.author }}
@@ -31,7 +31,7 @@
@@ -45,16 +45,16 @@ import { useRoute } from "#vue-router";
import type { News } from "~/types/news";
const route = useRoute();
-const slug = route.params.slug;
+const slug = route.params.slug as string;
-const article = ref
(null);
-
-article.value = await queryContent(`/news/${slug}`).findOne();
+const { data } = await useAsyncData(slug, () =>
+ queryContent(`/news/${slug}`).findOne()
+);
useSeoMeta({
- title: article.value?.title,
- description: article.value?.description,
- ogImage: article.value?.image.src,
+ title: data.value?.title,
+ description: data.value?.description,
+ ogImage: data.value?.image.src,
});