update
This commit is contained in:
@@ -1,9 +1,18 @@
|
||||
<script setup>
|
||||
import { useRoute } from "vue-router";
|
||||
import TechInfo from "~/components/main/TechInfo.vue";
|
||||
import siteConfig from "~/config";
|
||||
|
||||
const route = useRoute();
|
||||
const { data: content } = await useAsyncData(route.path, () => queryCollection("about").first());
|
||||
|
||||
useHead({
|
||||
title: `About - ${siteConfig.siteMeta.title}`,
|
||||
meta: [
|
||||
{ name: "description", content: siteConfig.siteMeta.description },
|
||||
{ name: "author", content: siteConfig.siteMeta.author },
|
||||
],
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@@ -27,7 +27,7 @@ const formattedData = computed(() => {
|
||||
path: articles.path,
|
||||
title: articles.title || "no-title available",
|
||||
description: articles.description || "no-description available",
|
||||
image: articles.image || "/blogs-img/blog.jpg",
|
||||
image: articles.image || getRandomFallbackImage(),
|
||||
alt: articles.alt || "no alter data available",
|
||||
date: articles.date || "not-date-available",
|
||||
tags: articles.tags || [],
|
||||
@@ -39,7 +39,7 @@ const formattedData = computed(() => {
|
||||
});
|
||||
|
||||
useHead({
|
||||
title: category.value,
|
||||
title: `Category: ${category.value}`,
|
||||
meta: [
|
||||
{
|
||||
name: "description",
|
||||
|
||||
@@ -28,9 +28,9 @@ const data = computed<BlogPost>(() => {
|
||||
});
|
||||
|
||||
useHead({
|
||||
title: siteConfig.siteMeta.title || "",
|
||||
title: `${data.value.title} - ${siteConfig.siteMeta.title}`,
|
||||
meta: [
|
||||
{ name: "description", content: siteConfig.siteMeta.description },
|
||||
{ name: "description", content: data.value.description },
|
||||
{ name: "author", content: siteConfig.siteMeta.author },
|
||||
],
|
||||
link: [
|
||||
|
||||
@@ -29,7 +29,7 @@ const formattedData = computed(() => {
|
||||
path: articles.path,
|
||||
title: articles.title || "no-title available",
|
||||
description: articles.description || "no-description available",
|
||||
image: articles.image || "/blogs-img/blog.jpg",
|
||||
image: articles.image || getRandomFallbackImage(),
|
||||
alt: articles.alt || "no alter data available",
|
||||
date: formatDate(articles.date) || "not-date-available",
|
||||
tags: articles.tags || [],
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
<script lang="ts" setup>
|
||||
import siteConfig from "~/config";
|
||||
|
||||
const { data } = await useAsyncData("all-blog-post-by-tags", () =>
|
||||
queryCollection("content").select("path", "tags").where("published", "=", true).all(),
|
||||
);
|
||||
@@ -20,7 +18,7 @@ data.value?.forEach((blog) => {
|
||||
});
|
||||
|
||||
useHead({
|
||||
title: `${siteConfig.siteMeta.title} - Tags`,
|
||||
title: "Tags",
|
||||
meta: [
|
||||
{
|
||||
name: "description",
|
||||
|
||||
Reference in New Issue
Block a user