Prepare your repository
- Choose Environment : Select or create a dedicated environment for the upgrade.
- Sync Repository : Sync your dev environment with production.
- Activate New Page Builder : Notify us once synced. We will activate the new Page Builder.
https://www.loom.com/share/abba2cc602044655a1e1374095198edc?sid=78f60f94-85d5-406f-ae6d-a57a8ff80b8a
Initialize Slice Machine & activate the Legacy Upgrader
-
Create a Git Branch : After enabling the new Page Builder, create a new branch where you will complete the upgrade.
-
Update Packages
- Ensure you use the latest version of your framework.
- Upgrade your Prismic packages to the latest versions.
-
Initialize Slice Machine
- Run:
npx @slicemachine/init@latest
- Select your Prismic repository, make sure you select the repository, not the environment
- Custom types will be pulled locally.
-
Access Slice Machine UI
<aside>
ℹ️ You can make sure Slice Machine is targeting your environment by checking the .env.local
file in at the root of your code. It is updated every time your switch environment to target the matching endpoint
</aside>
-
Activate Legacy Slice Upgrader
- Go to
http://localhost:9999/labs
and activate the upgrader.
- With the Legacy Slice Upgrader activated you can now head to the Custom Types page in Slice Machine to start upgrading Legacy Slices.
- Get familiar with the new models
- In the Legacy Builder, each slice is part of a specific custom type. In Slice Machine, can be shared across multiple types.
- Slice Machine also introduces Page types.
- A page type has default metadata fields and a slice zone for composing the content of web pages. New features in the page builder will be focused on page types.
- A custom type is a generic type that you can use to create menus, taxonomies, configurations, and other entities.
- To organise your types, we recommend converting some custom types into page types. Slice Machine will generate a page snippet to help you quickly set up these pages in your app.
https://www.loom.com/share/3cb9801c652e4bcbb1b42d64338862f4?sid=2edcb5f4-d2fd-482f-9ca8-27584bb8b67e