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#
Argument | Description | Required |
---|
<theme-name> | The name of your new theme | Yes |
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#
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#
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.
Modified atĀ 2025-01-23 10:53:20