Syncing components with the Headless CMS
After incorporating overridden components, sections, and updating the props of FastStore native components, one crucial step
is to ensure their availability in the Headless CMS.
Instructions
-
In the FastStore root directory, create a folder named
cms
. -
Inside
cms
, create thefaststore
folder. -
Within the
cms/faststore
folder, create thesections.json
file. -
Add the schema of the new section to the
sections.json
file. The schema defines how the Headless CMS renders the section.Refer to the Step 3: Adding sections to the Headless CMS guide for further information on how to structure the schema. Also, refer to the List of Native Sections and Overridable Components to check the schemas for each component. -
Open the terminal and log in to your vtex account by running
vtex login {accountName}
. -
run the following command to sync your changes with the Headless CMS:_10faststore cms-sync
-
Access the VTEX Admin and proceed to Storefront > Headless CMS.
-
Click on the page you desire to add the new section.
-
Click the add button (
+
) and add the new section.