Theme Preview
Preview your theme in development using a Zid demo store.
Description
The preview
command allows you to visualize your current theme in development using one of the demo stores associated with your Zid partner account. This command helps you see how your theme looks and functions in a live environment before deploying it to production.
Usage
themes-cli preview --store_email <email>
Required Options
--store_email <email>
: The email address associated with the development store you want to use for the preview.
Authentication
This command requires authentication to access your Zid partner account and associated development stores.
- If you're not logged in, the system will prompt you to log in.
- Use the
themes-cli login
command to authenticate.
Finding Your Development Stores
- A list of your development stores can be found in the Zid Partner Dashboard.
- Each store will have an associated email address that you'll need to use with this command.
Process
- Authenticate: The command will authenticate your account if you're not already logged in.
- Locate Store: It will locate the development store associated with the provided email.
- Upload Theme: Your current theme will be temporarily uploaded to the selected store.
- Preview URL: A preview URL will be generated and displayed in the console.
- Preview Theme: Open the URL in your web browser to see your theme in action.
Example
themes-cli preview --store_email partner123@zid.dev
Expected Output
Authenticating...
Finding development store for partner123@zid.dev...
Uploading theme to store...
Preview URL: http://demo.zid.dev/preview/your-theme
:::note[]
Important Notes
- Root Directory: Ensure you're in the root directory of your theme when running this command.
- Local Changes: Any changes made to your local files will not be reflected in the preview until you re-run the command.
:::
Troubleshooting
If you encounter issues:
Problem | Solution |
---|---|
Incorrect email or store not found | Verify that you're using the correct email for an existing development store. |
Not authenticated | Ensure you are authenticated by running the themes-cli login command. |
Invalid theme structure | Check that your theme follows the required structure and passes validation. |
:::info[]
Learn More
For more information on theme development and deployment, refer to the Zid Theme Development Documentation.
:::
Last modified: a month ago