davestewart / nuxt-content-assets

Enable locally-located assets in Nuxt Content

Home Page:https://npmjs.com/package/nuxt-content-assets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support custom unstorage drivers

shareable-vision opened this issue · comments

commented

Background

The promise of using the unstorage layer with Nuxt/Content/Assets is to be able to plug in any of a variety of sources.

Proposal

Studying the makeSourceStorage() of src/runtime/assets/source.ts, it appears that the module currently supports either the fs or github unstorage driver or defaults to the memory driver. I propose that the Nuxt Content Assets module support custom unstorage drivers as well following along the same pattern as the Nuxt Content module.

commented

I just wrote a webdav driver for unstorage. My goal is for authors to be able to simply write content on their own desktop or online via NextCloud. This currently works with Nuxt Content module, although I needed to submit a PR for Nuxt Content to build with custom drivers (nuxt/content#2193).

Hey there!

Seems like a reasonable proposal.

I haven't looked at the code for a while so don't have any thoughts right now but was planning to look at a couple of tickets in the next week or so.

Feel free to experiment between now and then and I'll get back to you :)

commented

I would be glad to help out . . I love the architecture of serving from plain directory of markdown (or MDC) and assets. The Content module really needs Content-Assets to be fully functional.

(I edited my comments here to stay on topic, and extracted proposal to support dynamic content.)