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 Package

Build your Zid theme for deployment effortlessly.

Description#

The build command compiles and packages your Zid theme into a deployable .zip file. By default, it assumes the current directory contains the theme and uses the root directory name for the output .zip file.

Usage#

Options#

OptionDescription
--path <directory>Specify the path to the theme directory. Default: current directory.
--name <name>Set a custom name for the output zip file. Default: root folder name.

Theme Structure Requirements#

The following structure is required for a valid Zid theme SDK. All mentioned files and folders are mandatory, though some folders (e.g., modules, locals, assets) can be empty.
$ 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 Specifications#

DirectoryPurposeAccepted Extensions
templates/Contains Twig template files..twig
modules/Holds reusable module templates..twig
common/Common template parts..twig
locals/Localization files..json
assets/Theme assets.See Assets Accepted Extensions below.

Assets Accepted Extensions#

Extension TypesExamples
JavaScript.js, .ts
CSS/SCSS.css, .scss, .map
Images.png, .jpg, .jpeg, .gif, .svg
Fonts.woff, .woff2, .otf, .ttf, .eot

Examples#

Build the theme in the current directory#

Build the theme from a specific path#

Build the theme with a custom output name#

Full command with custom path and name#


Important Notes#

Ensure your theme follows the required structure before building.
The build process validates your theme structure and throws an error if it's invalid.
If no --name is specified, the output .zip file will be named after the root directory.
Always verify the contents of the generated .zip file before deployment.

Learn More#

For more information on theme development and deployment, refer to the Zid Theme Development Documentation.
Modified at 2025-01-23 10:56:46
Previous
Theme Create
Next
Theme Update
Built with