We recommend using GitHub sync for local development, but you can still use the Gem if that’s your preferred workflow.
The Siteleaf Ruby gem is open source, to fork and contribute see: https://github.com/siteleaf/siteleaf-gem
Local development using the Siteleaf gem
1) Create a file called
Gemfile in your site’s root folder and add the Siteleaf gem and Jekyll to your bundle:
For help with Bundler or Gemfiles, please see: http://bundler.io/gemfile.html
2) Install the bundle:
3) Authorize your Siteleaf account:
4) Create or connect to a Siteleaf site:
To create a new Siteleaf site:
This will create a new theme folder called
yoursite.com in the directory where you ran this command. It will also create the site for you in your Siteleaf account. If you prefer not to create a new directory, run
bundle exec siteleaf new yoursite.com . instead.
To use an existing Siteleaf site:
You can then pull the Jekyll configuration, content, and current theme:
5) Start the Jekyll server:
Now visit localhost:4000 to see your site!
5) Push your content and theme to Siteleaf:
Important: When using
pull in v2, both theme and content files are included. Always make sure to do a
pull first to avoid overwriting your Siteleaf content on
push. Your local directory must have a
_config.yml in order to push.
Backing up your site
Creating a full backup of your site is simple. Just copy your
Gemfile to an empty directory and do a
This will include your entire site, including theme files, assets, content, and site metadata.