benjaminsehl / hydrogen-theme

A port of Hydrogen's default template to Shopify OS 2.0

Home Page:https://montalvomiguelo.myshopify.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hydrogen Theme

Build status License: MIT

A port of Hydrogen's default template to Shopify OS 2.0.

pika-1697163139924-1x

πŸ”¨ Requirements

πŸš€ Project Structure

This theme leverages the default Shopify theme folder structure and introduces the following directories, some of which have special behaviors.

└── hydrogen-theme
    └── frontend
        β”œβ”€β”€ entrypoints
        β”œβ”€β”€ islands
        β”œβ”€β”€ lib
        └── styles
Subdirectory Description
entrypoints The entry points for your theme
islands The interactive islands in your theme
lib Theme specific libraries
styles The styles of your theme

🧞 Commands

Command Action
pnpm install Installs dependencies
pnpm dev --live-reload full-page Launch the Shopify and Vite servers in parallel
pnpm run deploy Bundle your theme's assets and upload your local theme files to Shopify

🏝️ Hydration Directives

The following hydration strategies are available (borrowed from Astro).

Directive Description
client:idle Hydrate the component as soon as the main thread is free
client:visible Hydrates the component as soon as the element enters the viewport
client:media Hydrates the component as soon as the browser matches the given media query

Usage:

<my-component client:visible>This is an island.</my-component>

πŸ™‡β€β™‚οΈ Thanks

We would like to specifically thank the following projects for the inspiration and help regarding the creation of hydrogen-theme:

About

A port of Hydrogen's default template to Shopify OS 2.0

https://montalvomiguelo.myshopify.com/

License:MIT License


Languages

Language:Liquid 81.5%Language:JavaScript 17.4%Language:CSS 1.2%