Theme Create
Description
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
Argument | Description | Required |
---|---|---|
<theme-name> | The name of your new theme | Yes |
Theme 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
Directory | Purpose | Accepted 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
1.
2.
templates/
directory.assets/
directory.3.
build
and preview
to test and develop your theme.Important Notes
Learn More
Modified at 2025-01-23 10:53:20