Make your first template
Scaffold the Template
npx @lightspeed/crane@latest init --template my-storetemplates/my-store/
├── configuration.ts # Template metadata, header, and footer
└── pages/
├── home.ts # Home page layout
├── catalog.ts # Catalog page layout
├── category.ts # Category page layout
├── custom.ts # Custom page layout
└── product.ts # Product page layoutTemplate Configuration
// templates/my-store/configuration.ts
export default {
metadata: {
name: 'My Store Template',
description: 'A custom template featuring a hero banner on the home page.',
preview_url: 'https://my-store.company.site/',
cover_image: {
set: {
ORIGINAL: {
url: 'reference_template_cover_image.jpeg',
},
},
},
},
header: {
type: 'default',
id: 'header',
},
footer: {
type: 'default',
id: 'footer',
},
};Add the Section to a Page
Storefront Pages
Build and Preview
Next steps
Last updated
Was this helpful?
