Zid Docs
Merchant APIApp APIThemes
Merchant APIApp APIThemes
Help Center
Slack
  1. Themes CLI
  • 🚨 Important Update: Zid Themes
  • Landing Page Development
  • Getting Started with Zid Themes
    • Introduction to Theme Development
    • Manage your Themes
    • Building Themes in Zid
    • Theme File Structure
    • Twig Syntax and Features
    • Zid Theme Packager
  • Templates
    • Layout
    • Home Page
    • Products
    • Cart
    • Store Language and Currency
  • Settings Schema
    • Text
    • Number
    • Text-Area
    • Select
    • Radio Buttons
    • Checkbox
    • Range
    • Color
    • Image
    • Product
    • Category
    • List
    • Fieldset
  • Code Snippets
    • Apple Pay Quick Checkout
    • Custom CSS Injection
    • Displaying the Store's Business Center Logo
    • Customizing Copyright Text
    • Store's Main Navigation Menu
    • Customer Wishlist
    • Products
      • Products Badges
      • Product Ratings
      • Remaining Product Stock
      • Sold Items Count
      • Product Filtration by Attributes
      • Grouped Products
      • Product Questions & Answers
      • Product Restock Notfication
    • SEO
      • Images alt text
      • Themes SEO Marketing Tags
    • Marketing
      • Metafields
      • Gift Feature
      • Loyalty Program
  • Zid Themes Library: API Integration
    • Products
    • Product Categories
    • Cart
    • Blog
    • Customer
    • Store Settings
  • Data Reference
    • Locals
    • Store
    • Cart
    • Product
    • Products List
    • Category
    • Categories List
    • Session
    • FAQs
    • Customer
    • Blogs
    • Page
    • Main Menu
    • Main Navigation Menu
    • Request
    • Orders
    • Addresses
    • Store Payment Methods
    • Store Shipping Methods
    • Store Banks
    • Asset URL
    • Header Meta Tags
    • Loyalty pogram Wallet
  • Themes CLI
    • CLI Authentication
    • Theme Create
    • Theme Package
    • Theme Update
    • Themes List
    • Theme Preview
  1. Themes CLI

Theme Create

Create a new Zid theme effortlessly using our starter template.

Description#

The new command initializes a new Zid theme project with the specified name. It sets up the required file structure and installs dependencies, allowing you to start quickly.

Usage#

Arguments#

ArgumentDescriptionRequired
<theme-name>The name of your new themeYes

Theme Structure#

A newly created theme will have the following structure:
$ root
.
┃
┃─── query.json
┃─── layout.twig
┃─── header.twig
┃─── footer.twig
┃
┃─── templates (accepted extensions: [ '.twig' ])
┃    ┃─── 404.twig
┃    ┃─── home.twig
┃    ┃─── search.twig
┃    ┃─── products.twig
┃    ┃─── product.twig
┃    ┃─── categories.twig
┃    ┃─── category.twig
┃    ┃─── blogs.twig
┃    ┃─── blog.twig
┃    ┃─── faqs.twig
┃    ┃─── cart.twig
┃    ┃─── shipping-and-payments.twig
┃    ┃─── account-addresses.twig
┃    ┃─── account-orders.twig
┃    ┃─── account-profile.twig
┃
┃─── modules (accepted extensions: ['.twig'])
┃
┃─── common (accepted extensions: ['.twig'])
┃
┃─── locals (accepted extensions: ['.json'])
┃
┃─── assets

Directory Descriptions#

DirectoryPurposeAccepted Extensions
templates/Contains Twig template files for various pages..twig
modules/Holds reusable module templates..twig
common/Common template parts for repeated elements..twig
locals/Localization files for supporting multiple languages..json
assets/Theme assets, such as images, styles, and scripts..js, .css, .jpg, etc.

Examples#

Create a new theme with default options#

Post-Creation Steps#

After creating your theme:
1.
Navigate to the theme directory:
2.
Start customizing your theme:
Edit Twig templates in the templates/ directory.
Add custom styles and scripts in the assets/ directory.
3.
Use other Zid Theme commands:
Use commands like build and preview to test and develop your theme.

Important Notes#

Permissions: Ensure you have the necessary permissions to create directories in the chosen location.
Theme Name: The theme name should be unique and follow naming conventions (e.g., lowercase, no spaces, use hyphens or underscores).
Version Control: After creation, use version control tools like Git to manage your theme development.

Learn More#

For more information on theme development and deployment, refer to the Zid Theme Development Documentation.
Modified at 2025-01-23 10:53:20
Previous
CLI Authentication
Next
Theme Package
Built with