Skip to content

Customize an Existing Theme

When collaborating on a theme, each Partner need to set up the theme in their own dev store. This guide outlines the steps to add an existing theme in your dev store for collaborative development and testing.

Requirements

Before starting, make sure you have:

Step 1: Install YouCan CLI

If YouCan CLI isn’t installed yet, install it by running:

bash
npm install -g @youcan/cli@latest
bash
pnpm add -g @youcan/cli@latest
bash
yarn global add @youcan/cli@latest
bash
bun add -g @youcan/cli@latest

For additional guidance, refer to the YouCan CLI documentation for themes.

Step 2: Authenticate with YouCan

To access your development store and link it to the theme, authenticate with YouCan CLI by running:

bash
youcan auth login

Follow the prompts to log in and authorize access to your development store.

Step 3: Clone the Theme Repository

Start by cloning the theme project repository to your local environment:

bash
git clone <repository_url>

Replace <repository_url> with the actual repository URL of the theme.

Step 4: Configure the Theme for Your Dev Store

1. Navigate to the Theme Directory

bash
cd <theme_directory>

2. Remove Previous Store Configuration

Delete the existing youcan.theme.json file in the theme folder. This will reset any previous store connections.

bash
rm youcan.theme.json

3. Initialize the Theme in your Dev Store

Run the following command to generate a new ID linking the theme to your current dev store.

bash
youcan theme init --inplace # or simply -i

Step 5: Preview and Customize the Theme

Finally, to preview and make changes to the theme, run:

bash
youcan theme dev

This will open a new browser window with your store, allowing you to to view and test the modifications in real-time.

Note

If prompted for a password to access your dev store, follow these instructions to retrieve it.