Closed ktryndchrs closed 3 years ago
What is the dist
directory doing in here again?
Follow up on this comment @shawninder https://github.com/tjikko-studio/components/pull/108#discussion_r686972871
This was due to Kirby that create array of images by default.
So far my best solution on the backend side is to map every image of the content (when necessary, ex. section & logos) and change the structure of every one of them inside the content output
from this: image[{ ... }]
to this: image: { ... }
My solution (to be commit soon, was based on this: and lodash (I don't have any more clever solutions at the moment) https://stackoverflow.com/questions/35055731/how-to-deeply-map-object-keys-with-javascript-lodash
What's done:
What's left: Icons! The current way to use icon does not seems to be compatible with dynamic import of svg with custom names & paths (unless we use a library of icons, which would be heavy for no good reason… )