nuxt-themes / alpine

The minimalist blog theme, powered by Nuxt & Markdown.
https://alpine.nuxt.space
MIT License
285 stars 54 forks source link

[Components] `alt` attribute support for gallery images #124

Open ennioVisco opened 1 year ago

ennioVisco commented 1 year ago

The gallery component is quite nice, but it currently doesn't comply with standard HTML requirements (specifically, it does not forward alt attributes to the NuxtImg component: https://github.com/nuxt-themes/alpine/blob/main/components/content/Gallery.vue

Atinux commented 1 year ago

Good catch, happy to open a PR @ennioVisco ?

ennioVisco commented 1 year ago

Good catch, happy to open a PR @ennioVisco ?

I was trying but it's not very easy, if you can guide me in the process, I'd be happy to :)

I'm not sure about the correct strategy... I believe the best thing would be to wrap the input in a ProseImg instead of a NuxtImg, to make the DX in line with other images throughout the nuxt-content components. However, I cannot understand how to transform a markdown-valid string into a <Prose*/> component with the current composables :/

Tahul commented 1 year ago

@bdrtsky wdyt? :)