mirror of
https://github.com/rjNemo/meal_planner
synced 2026-06-12 05:16:47 +00:00
feat: improve SEO on index page
This commit is contained in:
parent
fbf840d448
commit
e5ede6f01a
3 changed files with 50 additions and 18 deletions
|
|
@ -4,21 +4,38 @@ export default defineNuxtConfig({
|
||||||
|
|
||||||
modules: ["@nuxt/eslint", "@nuxt/image", "nuxt-icon", "nuxt-delay-hydration"],
|
modules: ["@nuxt/eslint", "@nuxt/image", "nuxt-icon", "nuxt-delay-hydration"],
|
||||||
|
|
||||||
|
app: {
|
||||||
|
head: {
|
||||||
|
title: "Meal Planner",
|
||||||
|
meta: [
|
||||||
|
{ charset: "utf-8" },
|
||||||
|
{ name: "viewport", content: "width=device-width, initial-scale=1" },
|
||||||
|
{
|
||||||
|
hid: "description",
|
||||||
|
name: "description",
|
||||||
|
content: "Meal Planner",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
link: [{ rel: "icon", type: "image/png", href: "/favicon.png" }],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
build: {
|
build: {
|
||||||
transpile: ["trpc-nuxt"],
|
transpile: ["trpc-nuxt"],
|
||||||
},
|
},
|
||||||
|
|
||||||
css: ["~/assets/css/main.css"],
|
css: ["~/assets/css/main.css"],
|
||||||
|
|
||||||
image: {
|
|
||||||
domains: ["www.themealdb.com"],
|
|
||||||
},
|
|
||||||
|
|
||||||
delayHydration: {
|
delayHydration: {
|
||||||
mode: "init",
|
mode: "init",
|
||||||
// enables nuxt-delay-hydration in dev mode for testing
|
// enables nuxt-delay-hydration in dev mode for testing
|
||||||
debug: process.env.NODE_ENV === "development",
|
debug: process.env.NODE_ENV === "development",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
image: {
|
||||||
|
domains: ["www.themealdb.com"],
|
||||||
|
},
|
||||||
|
|
||||||
postcss: {
|
postcss: {
|
||||||
plugins: {
|
plugins: {
|
||||||
tailwindcss: {},
|
tailwindcss: {},
|
||||||
|
|
@ -35,4 +52,3 @@ export default defineNuxtConfig({
|
||||||
ssr: true,
|
ssr: true,
|
||||||
compatibilityDate: "2024-12-13",
|
compatibilityDate: "2024-12-13",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,4 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
useHead({
|
|
||||||
htmlAttrs: {
|
|
||||||
lang: "en",
|
|
||||||
},
|
|
||||||
link: [
|
|
||||||
{
|
|
||||||
rel: "icon",
|
|
||||||
type: "image/png",
|
|
||||||
href: "/favicon.png",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
||||||
|
|
||||||
const { params } = useRoute();
|
const { params } = useRoute();
|
||||||
const routeParam = params.id;
|
const routeParam = params.id;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,32 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
useHead({
|
||||||
|
htmlAttrs: {
|
||||||
|
lang: "en",
|
||||||
|
},
|
||||||
|
link: [
|
||||||
|
{
|
||||||
|
rel: "icon",
|
||||||
|
type: "image/png",
|
||||||
|
href: "/favicon.png",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
|
||||||
|
const url = useRequestURL();
|
||||||
|
useSeoMeta({
|
||||||
|
title: `Mood2Food`,
|
||||||
|
description: "The perfect meal that fits your mood",
|
||||||
|
ogTitle: `Mood2Food`,
|
||||||
|
ogDescription: "The perfect meal that fits your mood",
|
||||||
|
ogImage: "/logo192.png",
|
||||||
|
ogUrl: url.href,
|
||||||
|
twitterTitle: `Mood2Food`,
|
||||||
|
twitterDescription: "The perfect meal that fits your mood",
|
||||||
|
twitterImage: "/logo192.png",
|
||||||
|
twitterCard: "summary",
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="hero min-h-full bg-base-200">
|
<div class="hero min-h-full bg-base-200">
|
||||||
<div class="hero-content flex-col lg:flex-row-reverse">
|
<div class="hero-content flex-col lg:flex-row-reverse">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue