How to change Social Cards

I needed to make changes to the Social Cards as the default settings are not the current standards. Those can't be changed in slice-machine and when I change them in Prismic UI, they get overwritten next time I push the custom type from slice-machine. Please advice how to change them?

Hello @peter2, can you show me a screenshot of these Social Cards? It'll be easier if I can see if these are Slices, Custom Types, documents, etc.

Hi @Pau, good question - Sorry for not being more precise initially - i somehow thought Social Cards were standard in custom types, but I realized that I implemented them by following one of your guidelines. So, of course, you couldn't know what they are.

They are not configured with Slice machine, but appear as a slice in each custom type. I ended up modifying the index.json in the sub folder under customtypes locally and sync'ed it to Prismic - that seems to work.

Currently I have to change the social card definitions in each custom type separately. This caused a production issue that was nto easily to spot. With one of the last updates of slice-machine the syntax of api id's changed from camelCase to underscore and as the frontend uses the same metadata code for any custom type, it didn't pick up any social card values of one custom type. I raised that syntax issue already before. But in an ideal case I would like to have one global definition of those Social card slices which i can assign to cutom types. Is that already somehow doable? If not, don't worry, no need to put that on the agenda as they are very infrequently changing (hopefully not again in the next 2 years)

Hey @peter2, yes, it is doable. But you need to generate the Slices with Slice Machine only, so you shouldn't use the legacy builder anymore because it causes these conflicts.

My recommendation would be to redo the Slices all over again in Slice Machine and then slowly migrate the document's content to that new one. This will allow you to have one source of truth.