Closed eduardor2k closed 8 months ago
Hey! I just gave this a try in a local Vue 3 project and it worked without any issues. I tried putting this in a Head
in both a page component and a layout component.
Here's my page component:
<script lang="ts">
import Layout from '../Components/Layout.vue'
export default { layout: Layout }
</script>
<script setup lang="ts">
import { Head } from '@inertiajs/vue3'
</script>
<template>
<Head title="Article">
<meta head-key="description" name="description" content="My Description" />
</Head>
<h1 class="text-3xl">Article</h1>
<article class="max-w-3xl">
<p class="my-6">
Sunt culpa sit sunt enim aliquip. Esse ea ea quis voluptate. Enim consectetur aliqua ex ex magna cupidatat id
minim sit elit. Amet pariatur occaecat pariatur duis eiusmod dolore magna. Et commodo cupidatat in commodo elit
cupidatat minim qui id non enim ad. Culpa aliquip ad Lorem sit consectetur ullamco culpa duis nisi et fugiat
mollit eiusmod. Laboris voluptate veniam consequat proident in nulla irure velit.
</p>
</article>
</template>
Keep in mind that this will only appear client-side unless you're running an SSR server.
Going to close this one for now as I can't reproduce this, but if you want to provide a minimal reproduction as a Git repo I'd be happy to have another look 👍
Thanks for replying, will test this in a clean laravel + inertiajs installation, my codebase was a Laravel 7 app that has been updated, maybe I missed something
Just tested, my issue is as you said, I need to have SSR running, in my app it's broke, will solve that now, tested in a brand new install and everything works
Thanks!
Version:
@inertiajs/vue3
version: 1.0.14Describe the problem:
When I add anything to the Head component, only the title is added to
:https://inertiajs.com/title-and-meta
From the docs, it should work out of the box, but I'm only getting the title
Steps to reproduce:
Only the title will be added to head
Thanks for helping!