Themes built on the Twig templating engine are now deprecated and require migration to Vitrin to ensure continued support and compatibility with Zid.
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.
Option | Description |
---|---|
--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. |
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 | Purpose | Accepted 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. |
Extension Types | Examples |
---|---|
JavaScript | .js , .ts |
CSS/SCSS | .css , .scss , .map |
Images | .png , .jpg , .jpeg , .gif , .svg |
Fonts | .woff , .woff2 , .otf , .ttf , .eot |
--name
is specified, the output .zip
file will be named after the root directory..zip
file before deployment.