content
content copied to clipboard
How to handle content assets?
I see there is Nuxt Studio which looks super cool. But I'd like to deploy my Nuxt Content V3 elsewhere. My 'content' folder itself is a repo of markdown files. I'd like to store and serve images with and from the content folder. To keep the content images with the markdown content files. I'd like to link those local images from Markdown. Imagine that I use Obsidian to author the content like so:

So far I have been using Nuxt Content Assets with Nuxt Content V2: https://github.com/davestewart/nuxt-content-assets
But the plugin does not seem to be maintained, nor does it work with Nuxt Content 3.
What options, beside Nuxt Content Studio, are available?
I am not considering public and assets folder from Nuxt, since I want to store those content assets with the content repo. The content repo should be independent of the Nuxt application. I have asked this on Discord before.
The author replied two weeks ago; see https://github.com/davestewart/nuxt-content-assets/issues/90.
But it is a thing so basic, that I would expect to be to be a core part of Nuxt Content.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.
Can we re-open this? I'm not sure about Nuxt Studio, but hosting all the assets in the public or assets folder sounds like a red-flag to me too :(
Hi @farnabaz, what do you think? I asked for updates to the maintainer 4 months after he answered that he would be back to OSS in a week. Unfortunately, we haven't received a response yet. Does it make sense to you for this to be integrated into Nuxt Content? If we ignore the WS part that he was forced to replicate, it doesn't seem like there's a lot to do.
@DraftProducts
Well, I did it in my repo, dropping the nuxt-content-assets dependency.
https://github.com/stared/stared.github.io/pull/12
Loot at copy:assets
https://github.com/stared/stared.github.io/pull/12/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519 and https://github.com/stared/stared.github.io/pull/12/files#diff-66cedf214901bc9543871a00a6e21ab77a1f882b40a8271843fac8f2eeb57f05.
It is a hacky way (tl;dr: just copy images to the public folder with a script)., but works. Very likely it is possible to do it in a simpler way, just https://www.npmjs.com/package/vite-plugin-static-copy.
Hi @stared thank you for your advice!
Actually, nuxt-content-assets cover a lot of use cases and issues with images.
For me and i think most of the cases, copying files isn't enough.
Hope we get a proper integration in Nuxt content.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.
This issue isn't stale, it is still not possible to migrate to content v3 since there is still no way to support images from github source like it was possible with Nuxt Content Assets module only compatible with content v2.
@farnabaz up
Big up from me here as well
"Solved" the problem by migrating to Astro (https://github.com/stared/stared.github.io/pull/16 and https://github.com/stared/stared.github.io/pull/17)