Zid Docs
Merchant APIPayment APIAppsThemes
Merchant APIPayment APIAppsThemes
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
    • Store Social Media
    • 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