The posthaven_theme
gem provides command line tools for developing a Posthaven theme on your computer and pushing updates to Posthaven.
This gem requires Ruby 2.0 or above.
Log in and get your Posthaven account API key here.
To install the posthaven_theme
gem use 'gem install' (you might have use 'sudo gem install')
gem install posthaven_theme
to update to the latest version
gem update posthaven_theme
The gem installs the phtheme
CLI program.
phtheme help
Generate a configuration file. For your API key see above.
phtheme configure api-key
phtheme upload
phtheme upload layouts/theme.liquid
phtheme remove assets/layout.liquid
phtheme replace
phtheme watch
Running phtheme configure
generates config.yml
file in the base directory of your theme. If you are storing your theme in version control it is highly recommended that you DO NOT store this file in version control, e.g. in git add it to your .gitignore
.
config.yml
has the following options:
api_key
– Your Posthaven API keytheme_id
– The ID of the theme to edit. The easiest way to populate the theme id is via theconfigure
command above.
See the phtheme configure
command above for one step setup of the config.yml
file.
A huge thanks to Shopify for their shopify_theme gem upon which this is based.