thainv-dev: UI

This commit is contained in:
nguyen van thai
2024-06-18 14:04:24 +07:00
parent f17e28472c
commit d103f4bbf7
19 changed files with 246 additions and 155 deletions
+11
View File
@@ -25,6 +25,17 @@ const store = reactive({
(async () => {
try {
await store.article.getArticleBySlug(route.params.slug);
// useHead({
// title: currentArticle.value?.title.replace(/<\/?[^>]+(>|$)/g, ""),
// })
useSeoMeta({
title: currentArticle.value?.title.replace(/<\/?[^>]+(>|$)/g, ""),
ogTitle: currentArticle.value?.title.replace(/<\/?[^>]+(>|$)/g, ""),
description: currentArticle.value?.intro.replace(/<\/?[^>]+(>|$)/g, ""),
ogDescription: currentArticle.value?.intro.replace(/<\/?[^>]+(>|$)/g, ""),
ogImage: currentArticle.value?.thumbnail,
})
} catch (error) {
console.error("Error fetching data:", error);
}