Damien
Damien
NNuxt
Created by Damien on 7/29/2024 in #❓・help
How use NuxtContent to hydrate Vue Components using image path ?
Hi, I'm creating a card component to display persons. Like this: Markdown content file :
::card
Main title
#firstName
Robert
#src
robert.jpg
::
::card
Main title
#firstName
Robert
#src
robert.jpg
::
Vue content file
<template>
<div>
<div>
<slot />
</div>
<div>
<slot name="firstName" />
</div>
<img :src="imgSrc" />
</div>
</template>
<template>
<div>
<div>
<slot />
</div>
<div>
<slot name="firstName" />
</div>
<img :src="imgSrc" />
</div>
</template>
But the src is not working with this approach. How can I fix this?
3 replies
NNuxt
Created by Damien on 7/24/2024 in #❓・help
Nuxt Content for Static Site Generation
Hi, I'm using Nuxt Content with markdown files. It works fine in development and when I generate production builds. The problem occurs when I try to disable SSR (Server-Side Rendering). An error appears when loading a markdown file: Document not found, overwrite this content with #not-found slot in <ContentDoc>.
14 replies