Coder Social home page Coder Social logo

controlledchaos / shopify_theme Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shopify/shopify_theme

0.0 2.0 0.0 3.21 MB

A console tool for interacting with Shopify Theme Assets.

Home Page: http://shopify.github.io/shopify_theme

License: MIT License

Ruby 100.00%

shopify_theme's Introduction

Edit your Shopify theme locally

Gem Version

The Shopify theme gem is a command line tool that lets you make live changes to themes on your Shopify store. If the command line is scary, check out the Desktop Theme Editor app.

It will watch your local folders for any changes in your theme (including adding and removing files) and will update your .myshopify.com store to the latest changes.

Shopify theme gem

You do not need to make changes to your default theme. You can leverage the theme preview feature of Shopify that allows you to view what an unpublished theme looks like on your Shopify store. This means you don't need to sign up for extra accounts and keep your shop up to date. You will however have a blue bar that shows up that you can remove via the web inspector in Chrome or Safari.

Requirements

This gem works with OS X or Windows with Ruby 1.9.

First time installing Ruby on windows? Try Rubyinstaller.

Installation

To install the shopify_theme gem use 'gem install' (you might have use 'sudo gem install')

gem install shopify_theme [optional_theme_id]

to update to the latest version

gem update shopify_theme

Usage

Generate the config file. Go get a valid api_key and password for your store head to https://[your store].myshopify.com/admin/apps/private and generate a private application. By default it adds the main theme, if you want to edit one of your other themes, add the theme_id.

theme configure api_key password store_url

Example of config.yml. Notice store has no http or https declaration. You can use :whitelist_files: to specify files for upload. The assets/, config/, layout/, snippets/, templates/ and locales/directories are included by default.

You can also use :ignore_files: to exclude files from getting uploaded, for example your config/settings.html or other configuration driven items

---
:api_key: 7a8da86d3dd730b67a357dedabaac5d6
:password: 552338ce0d3aba7fc501dcf99bc57a81
:store: little-plastics.myshopify.com
:theme_id:
:whitelist_files:
- directoryToUpload/
- importantFile.txt
:ignore_files:
- config/settings.html

Download all the theme files

theme download

Upload a theme file

theme upload assets/layout.liquid

Remove a theme file

theme remove assets/layout.liquid

Completely replace shop theme assets with the local assets

theme replace

Watch the theme directory and upload any files as they change

theme watch

Open the store in the default browser

theme open

Bootstrap a new theme with Timber

# use latest stable
theme bootstrap api_key password shop_name theme_name

# use latest build
theme bootstrap api_key password shop_name theme_name master

Common Problems

SSL Certificates won't verify on Windows

If you are experiencing SSL validation errors, it is most likely because your installation does not have any valid certificates. This can be taken care of by downloading a certificate file and setting a the SSL_CERT_FILE environment variable on your system. For more details check out the following gist.

See the following issue for more details

How do I edit a theme that isn't my shops main theme?

This can be done by setting the theme_id field in config.yml which was created when you ran theme configure. Your file should look like the following:

---
:api_key: 7a8da86d3dd730b67a357dedabaac5d6
:password: 552338ce0d3aba7fc501dcf99bc57a81
:store: little-plastics.myshopify.com
:theme_id: 0987654321

Where can I find my Theme Id?

Currently the best way to find the id of the theme you want to edit is to go to the theme in your shops admin and grab it from the url.

themes/THEME_ID/settings

shopify_theme's People

Contributors

benedfit avatar benschwarz avatar builtbylane avatar byroot avatar christopherlobay avatar cshold avatar dannysmith avatar dylanahsmith avatar gavinballard avatar hsleewis avatar jdlich avatar jduff avatar jedifreeman avatar jiblits avatar jiop avatar jstorimer avatar keichan34 avatar l4u avatar markdunkley avatar michaecleyn avatar paddydwyer avatar phlipper avatar robvolk avatar tylerball avatar we5 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.