I'm creating a single codebase and i want to use slicemachine in it. Now, i have a doubt... is there any way to use only one codebase to multiple slicemachine?
In the file: sm.json, we have the apiEndpoint property. I thought about do something like that:
Can you say more about your use case? Are you going to duplicate the codebase for multiple projects, or do you want to switch between repositories in one app? What is this for?
I've never seen anyone try that before. Why do you want to switch between repositories in one app? (If I understand your app better, I can give better suggestions.)
We want a single codebase for multiple websites. We have done it before, because our codebase is generic and we need only to change the prismic api. So we do it, based on a environment variable.
The main benefit of Slice Machine is for modelling content in your Prismic repo. If what you're describing is possible (though I'm not sure it is; I'll check with my team), you would have to manage your Custom Types and Slices separately for each repo. That means if you change your Custom Types or Slices, you would have to change the environment variable to push the changes to each repo. Is that what you have in mind?
Env variables and Slice Machine have previously been discussed here:
Although, it's not possible at the minute, but tracked as a feature request.
(This is something the team really wants to implement but it’s not in the pipe right now. If you have a certain scripted flow, you can rewrite the manifest whenever necessary of course.)
system
(system)
closed as resolved, flag & select 'Something Else' to reopen.
13
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.