content icon indicating copy to clipboard operation
content copied to clipboard

Add support for XML/DRAWIO

Open Rednas83 opened this issue 2 years ago • 6 comments

Is your feature request related to a problem? Please describe

Are there plans for bringing back xml in Nuxt Content V2? Perhaps also add special support for drawio which has a vscode extension?

Describe the solution you'd like

https://content.nuxtjs.org/v1/getting-started/writing#xml https://content.nuxtjs.org/v1/getting-started/configuration#xml

Describe alternatives you've considered

Write a custom parser for xml/drawio files

Additional context

Something like: image

Rednas83 avatar Jun 24 '23 11:06 Rednas83

If you need to parse other file types, you should be able to create custom transformers.

nobkd avatar Jun 25 '23 17:06 nobkd

I already use a custom transformer for sheetjs.

I guess I could try to write something similar for xml, but are there also plans for adding official support for xml?

Is there also a list of all available custom transformers?

Rednas83 avatar Jun 26 '23 13:06 Rednas83

Well... You write custom transformers yourself... And I don't know of any place where they're shared. Currently, supported file types by plain nuxt/content are, as you can see:

image

(

)

Though those in parentheses aren't that well documented

nobkd avatar Jun 26 '23 13:06 nobkd

Ok, so no plans for xml out of the box like with v1?

Rednas83 avatar Jun 26 '23 14:06 Rednas83

I don't think so. 🤷 But if you're interested, you could add native support for XML with a PR.

nobkd avatar Jun 26 '23 15:06 nobkd

Is it an idea to introduce a place where we can share custom transformers?

I find the current support great, but also a bit limiting. image

Should content not be about all the possible static content including images like xml, xlsx, svg, drawio, etc.

Currently working on a svg parser which can also do some simple transformations. image

I wouldn't mind sharing if there is a logical place for it. I could also share it a separate nuxt module, but I think it makes more sense as part of nuxt content.

Rednas83 avatar Mar 07 '24 13:03 Rednas83