mirror of
https://github.com/rjNemo/meal_planner
synced 2026-06-12 13:26:45 +00:00
add seo
This commit is contained in:
parent
ba78374f81
commit
27c7ffacf6
2 changed files with 36 additions and 3 deletions
|
|
@ -10,20 +10,40 @@ if (!recipes.value) {
|
||||||
statusMessage: "Category not found",
|
statusMessage: "Category not found",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const { data: categories } = await useCategories();
|
||||||
|
const category = categories.value?.find((c) => c.name === categoryName);
|
||||||
|
|
||||||
|
const url = useRequestURL();
|
||||||
|
useSeoMeta({
|
||||||
|
title: `${categoryName} | Mood2Food`,
|
||||||
|
description: "The perfect meal that fits your mood",
|
||||||
|
ogTitle: `${categoryName} | Mood2Food`,
|
||||||
|
ogDescription: "The perfect meal that fits your mood",
|
||||||
|
ogImage: category!.picture,
|
||||||
|
ogUrl: url.href,
|
||||||
|
twitterTitle: `${categoryName} | Mood2Food`,
|
||||||
|
twitterDescription: "The perfect meal that fits your mood",
|
||||||
|
twitterImage: category!.picture,
|
||||||
|
twitterCard: "summary",
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="hero h-[40vh] bg-cover bg-center relative">
|
<div
|
||||||
|
class="hero h-[40vh] bg-cover bg-center relative"
|
||||||
|
:style="`background-image: url(${category!.picture})`"
|
||||||
|
>
|
||||||
<div class="hero-overlay bg-opacity-60"></div>
|
<div class="hero-overlay bg-opacity-60"></div>
|
||||||
<div class="hero-content text-center text-neutral-content">
|
<div class="hero-content text-center text-neutral-content">
|
||||||
<h1 class="text-5xl font-bold">{{ categoryName }}</h1>
|
<h1 class="text-5xl font-bold">{{ category?.name || categoryName }}</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container mx-auto px-4 py-8">
|
<div class="container mx-auto px-4 py-8">
|
||||||
<div class="prose max-w-none mb-12">
|
<div class="prose max-w-none mb-12">
|
||||||
<!-- <p>{{ category!.description }}</p> -->
|
<p>{{ category!.description }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="status === 'pending'" class="flex justify-center my-8">
|
<div v-if="status === 'pending'" class="flex justify-center my-8">
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,19 @@ if (error.value) {
|
||||||
message: error.value.message,
|
message: error.value.message,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
const url = useRequestURL();
|
||||||
|
useSeoMeta({
|
||||||
|
title: `Recipe categories | Mood2Food`,
|
||||||
|
description: "The perfect meal that fits your mood",
|
||||||
|
ogTitle: `Recipe categories | Mood2Food`,
|
||||||
|
ogDescription: "The perfect meal that fits your mood",
|
||||||
|
ogImage: "/logo192.png",
|
||||||
|
ogUrl: url.href,
|
||||||
|
twitterTitle: `Recipe categories | Mood2Food`,
|
||||||
|
twitterDescription: "The perfect meal that fits your mood",
|
||||||
|
twitterImage: "/logo192.png",
|
||||||
|
twitterCard: "summary",
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue