Update nuxt to version 4 (#92)

* Nuxt 3.17.4 and other dependencies updated

* Temporary fix (maybe) of the Inline Code

* Update nuxt to version 4
This commit is contained in:
Nicolhetti
2025-09-22 09:53:50 -03:00
committed by GitHub
parent 6a2ed6dee5
commit 5163e756f0
53 changed files with 4278 additions and 4597 deletions

View File

@@ -0,0 +1,57 @@
<script lang="ts" setup>
import { makeFirstCharUpper } from '@/utils/helper'
const { data } = await useAsyncData('all-blog-post-by-category', () =>
queryCollection('content').all(),
)
const allTags = new Map()
data.value?.forEach((blog) => {
const tags: Array<string> = (blog.meta.tags as string[]) || []
tags.forEach((tag) => {
if (allTags.has(tag)) {
const cnt = allTags.get(tag)
allTags.set(tag, cnt + 1)
} else {
allTags.set(tag, 1)
}
})
})
useHead({
title: 'Categories',
meta: [
{
name: 'description',
content:
'Below All the topics are listed on which either I have written a blog or will write a blog in near future.',
},
],
})
// Generate OG Image
const siteData = useSiteConfig()
defineOgImage({
props: {
title: 'Categories',
description:
'Below All the topics are listed on which either I have written a blog or will write a blog in near future.',
siteName: siteData.url,
},
})
</script>
<template>
<main class="container max-w-5xl mx-auto text-zinc-600">
<CategoryHero />
<div class="flex flex-wrap px-6 mt-12 gap-3">
<CategoryCard
v-for="topic in allTags"
:key="topic[0]"
:title="makeFirstCharUpper(topic[0])"
:count="topic[1]"
/>
</div>
</main>
</template>