ghost-theme-development
ghost-theme-development copied to clipboard
Ghost (http://ghost.org) Theme development environment
Ghost Template development environment
- Requirements
- Installation of dependencies
- Building
- Serving the files with a local webserver
- Sublime Text
Requirements
-
nodejs,
On a mac fetch it with homebrew:
brew install node
-
gulp,
Install via npm if you don't have it:
npm install -g gulp
-
bower,
Install via npm if you don't have it:
npm install -g bower
Installation of dependencies
Execute the following commands while in the package dir (package.json
lies there):
-
npm install
-
bower install
It will fetch a lot of gulp plugins, a ghost package and the inuitcss framework.
Building
There are three main targets for building:
-
default
(just rungulp
without arguments), builds the complete theme and dumps tocontent/themes/dev/
-
livereload
(rungulp livereload
) starts a file watcher and a livereload server, and a ghost demo instance. connect your browser to that server (or just depend on the inserted javascript shim) to get a live preview while editing templates or css -
dist
(rungulp dist
) packs up the template indev-theme.zip
and removes livereload and.map
files.
Serving the files with a local webserver
Just use the gulp task livereload
:
gulp livereload
This will run a demo ghost instance on http://localhost:2368 (user template
, email: [email protected]
, password: template
) with the dev-theme preselected.
Sublime Text
If you're using Sublime Text, please open the template-dev
project, it hides all things that are not neccessary for developing a template.
Furthermore it defines 2 build targets:
-
build
for just compiling the template -
preview
for running a ghost instance and enabling live reload for your browser