You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to easily be able to wrap my gallery blocks in some custom HTML, but rather than re-write the image serializer, re-use the default serializer when the block encountered is an image. is there an easy way to do this?
The text was updated successfully, but these errors were encountered:
I have come up with a solution, but it's not ideal:
FWIW, I am using Eleventy to render my data, which can handle a number of different templating languages.
injecting HTML into my markdown meant the markdown template rendered my code as a string, so I switched to @sanity-io/block-content-to-html. converting my blocks to HTML means I need to tell my template that my string is safe.
I have configured a "gallery" block with an array of image fields:
I'd like to easily be able to wrap my gallery blocks in some custom HTML, but rather than re-write the image serializer, re-use the default serializer when the block encountered is an image. is there an easy way to do this?
The text was updated successfully, but these errors were encountered: