Getting started | Staying up to date with Dawn changes | Developer tools | Contributing | Code of conduct | Theme Store submission | License
Dawn represents a HTML-first, JavaScript-only-as-needed approach to theme development. It's Shopify's first source available theme with performance, flexibility, and Online Store 2.0 features built-in and acts as a reference for building Shopify themes.
- Web-native in its purest form: Themes run on the evergreen web. We leverage the latest web browsers to their fullest, while maintaining support for the older ones through progressive enhancement—not polyfills.
- Lean, fast, and reliable: Functionality and design defaults to “no” until it meets this requirement. Code ships on quality. Themes must be built with purpose. They shouldn’t support each and every feature in Shopify.
- JavaScript not required, fails gracefully: We extract every bit of speed and functionality out of HTTP, semantic HTML, and CSS before writing our first line of JavaScript. JavaScript can only be used to progressively enhance features.
- Server-rendered: HTML must be rendered by Shopify servers using Liquid. Business logic and platform primitives such as translations and money formatting don’t belong on the client. Async and on-demand rendering of parts of the page is OK, but we do it sparingly as a progressive enhancement.
- Functional, not pixel-perfect: The Web doesn’t require each page to be rendered pixel-perfect by each browser engine. Using semantic markup, progressive enhancement, and clever design, we ensure that themes remain functional regardless of the browser.
You can find a more detailed version of our theme code principles in the contribution guide.
- Fork the repository and clone it:
git clone [email protected]:your-username/dawn.git
cd dawn
- Install the Shopify CLI by following these steps.
- Launch a development server in the
dawn/
folder:
shopify theme serve
ℹ️ You'll need access to a Shopify store in order to get started with theme development. If you don't already have one, you can set up a development store.
Say you're building a new theme off Dawn but you still want to be able to pull in the latest changes, you can add a remote upstream
pointing to this Dawn repository.
- Navigate to your local theme folder.
- Verify the list of remotes and validate that you have both an
origin
andupstream
:
git remote -v
- If you don't see an
upstream
, you can add one that points to Shopify's Dawn repository:
git remote add upstream https://github.com/Shopify/dawn.git
- Pull in the latest Dawn changes into your repository:
git fetch upstream
git pull upstream main
There are a number of really useful tools that the Shopify Themes team uses during development. Dawn is already set up to work with these tools.
Shopify CLI helps you build Shopify themes faster and is used to automate and enhance your local development workflow. It comes bundled with a suite of commands for developing Shopify themes—everything from working with themes on a Shopify store (e.g. creating, publishing, deleting themes) or launching a development server for local theme development.
You can follow this quick start guide for theme developers to get started.
We recommend using Theme Check as a way to validate and lint your Shopify themes.
We've added Theme Check to Dawn's list of VS Code extensions so if you're using Visual Studio Code as your code editor of choice, you'll be prompted to install the Theme Check VS Code extension upon opening VS Code after you've forked and cloned Dawn.
Theme Check is included as part of Dawn's GitHub Actions and can also be run via Shopify CLI's shopify theme check
command.
We love performant websites! Which is why we created Shopify/lighthouse-ci-action. This runs a series of Google Lighthouse audits for the home, product and collections pages on a store for every commmit to ensure code that gets added doesn't degrade storefront performance over time.
Dawn uses GitHub Actions to run Shopify/lighthouse-ci-action for every commit. This is a starting point and what we suggest to use in order to ensure you're building better themes. Feel free to build off of it!
Want to make commerce better for everyone by contributing to Dawn? We'd love your help! Please read our contributing guide to learn about our development process, how to propose bug fixes and improvements, and how to build for Dawn.
All developers who wish to contribute through code or issues, please first read our Code of Conduct.
The Shopify Theme Store is the place where Shopify merchants find the themes that they'll use to showcase and support their business. As a theme partner, you can create themes for the Shopify Theme Store and reach an international audience of an ever-growing number of entrepreneurs.
Ensure that you follow the list of theme store requirements if you're interested in becoming a Shopify Theme Partner and building themes for the Shopify platform.
Copyright (c) 2021-present Shopify Inc. See LICENSE for further details.