Skip to main content

Quick Start

Get up and running with Horizon in minutes. This guide will walk you through cloning the repository, installing dependencies, and launching your local development environment.
1

Clone the Repository

Clone the Horizon repository from GitHub to your local machine:
This creates a local copy of the Horizon theme in a directory called horizon.
2

Install Shopify CLI

Shopify CLI is essential for theme development. It provides commands for working with themes on a Shopify store and launching a local development server.Install via Homebrew (macOS/Linux):
Install via npm:
Install via Ruby gem:
Verify the installation:
You’ll need Node.js 18+ and npm 8+ for the npm installation method.
3

Connect to a Shopify Store

Authenticate with Shopify and connect your theme to a development store:
This command will:
  1. Prompt you to log in to your Shopify Partner account
  2. Let you select or create a development store
  3. Upload your theme to the store
  4. Start a local development server
If you don’t have a development store, you can create one for free in your Shopify Partner account.
4

Start Developing

Once the development server is running, you’ll see output like this:
Open the preview URL in your browser and start making changes. The page will automatically reload when you save files.

Development Workflow

File Watching & Hot Reload

The Shopify CLI development server watches your theme files and automatically syncs changes to your store:
  • Liquid files (.liquid): Changes are synced and the page reloads
  • Asset files (.js, .css): Changes are synced and the page hot-reloads
  • Config files (.json): Changes are synced and require a manual refresh

Theme Editor

While developing, you can use the Shopify theme editor to customize sections and settings:
Changes made in the theme editor are automatically saved to your store but not synced back to your local files.
Settings changed in the theme editor must be manually pulled to your local environment using:

Project Structure

Understanding Horizon’s file structure will help you navigate and customize the theme:

Core Directories

Contains all JavaScript, CSS, and static assets. Horizon uses vanilla JavaScript with web components:
JavaScript files are loaded as ES modules with type="module".
Shopify sections that can be added to pages through the theme editor:
Each section includes its schema for theme editor customization.
Theme blocks that can be used within sections:
Blocks are prefixed with _ to distinguish them from sections.
Reusable Liquid code that can be rendered anywhere:
Snippets are included using {% render 'snippet-name' %}.
JSON templates that define the default sections for each page type:
Global theme configuration and settings:
The settings schema defines what appears in the theme editor.

Essential Commands

Here are the most common Shopify CLI commands you’ll use:

Development Server

Theme Management

Theme Information

Run shopify theme --help to see all available commands and options.

Development Tools

Horizon is set up to work with several development tools that enhance your workflow:

Theme Check

Theme Check validates and lints your Shopify themes. It’s included in Horizon’s VS Code configuration. Run Theme Check:
Common checks:
  • Liquid syntax errors
  • Performance issues
  • Accessibility problems
  • Translation key issues
VS Code Extension: If you’re using Visual Studio Code, you’ll be prompted to install the Theme Check extension when you open the project.
Horizon runs Theme Check on every commit via Shopify/theme-check-action to ensure code quality.

Git Configuration

Horizon includes a .gitignore file configured for theme development:
Important: config/settings_data.json is ignored by default because it contains store-specific settings. Each developer should maintain their own version.

Staying Up to Date

If you’re building a custom theme based on Horizon and want to pull in the latest changes:
1

Add Upstream Remote

Add the official Horizon repository as a remote:
Verify your remotes:
You should see:
2

Fetch Upstream Changes

Fetch the latest changes from Horizon:
3

Merge Changes

Merge the upstream changes into your branch:
This may create merge conflicts if you’ve modified the same files. Resolve conflicts carefully, testing your theme after merging.

Troubleshooting

CLI Connection Issues

Problem: Can’t connect to Shopify store

Port Already in Use

Problem: Development server won’t start

Files Not Syncing

Problem: Changes aren’t appearing in the browser
  1. Check that the file isn’t ignored in .shopifyignore
  2. Try restarting the development server
  3. Clear your browser cache
  4. Check for Liquid syntax errors in the terminal

Theme Check Errors

Problem: Theme Check reports issues Run Theme Check to see specific issues:
Fix reported issues or add exceptions to .theme-check.yml if needed.

Next Steps

Now that your development environment is set up, explore these resources:

Core Concepts

Learn about Horizon’s architecture and design patterns

Components

Explore the web components that power Horizon

Theming Guide

Customize colors, typography, and styles

API Reference

Detailed API documentation for all components

Additional Resources