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.
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.
This gem works with OS X or Windows with Ruby 1.9.
First time installing Ruby on windows? Try Rubyinstaller.
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
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. Default it adds the main theme, if you want to edit one of your other themes, add the
theme configure api_key password store_url
Example of config.yml. Notice store has no http or https declaration. You can
:whitelist_files: to specify files for upload. The
templates/ directories are included by default.
--- :api_key: 7a8da86d3dd730b67a357dedabaac5d6 :password: 552338ce0d3aba7fc501dcf99bc57a81 :store: little-plastics.myshopify.com :theme_id: :whitelist_files: - directoryToUpload/ - importantFile.txt
Download all the theme files
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
Watch the theme directory and upload any files as they change
Open the store in the default browser
This can be done by setting the
theme_id field in
config.yml which was created when you
theme configure. Your file should look like the following:
--- :api_key: 7a8da86d3dd730b67a357dedabaac5d6 :password: 552338ce0d3aba7fc501dcf99bc57a81 :store: little-plastics.myshopify.com :theme_id: 0987654321
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.