Ghost Theme Starter is a repo to make it easy to get start creating a new theme for the Ghost blogging platform. The purpose it to create a bank canvas to experience Ghost theme designers to start from and to have enough functionaly built in that a designers new to Ghost can get started without having to learn a ton about the platform first.
You need to have Ruby
installed for SASS compilation.
Clone the repository from:
git clone https://github.com/jernejcic/GhostThemeStarter.git
Then install the dependencies using:
cd GhostThemeStarter
gem install sass
npm install
bower install
grunt init
Now update theme/settings.json
with the desired setup you would like. If you do not want to use a feature, then remove its value from the settings. See Settings below for more info.
After configuring the settings run:
grunt create
At this point you have a fully functional--though very simple--theme. You will find it in the theme
folder. It would be suitable to use in a blog functionality wise.
The optional last step is to build a compressed version of the theme. This minifies the CSS and HTML and drops the theme in it's own folder with the name that you put in the theme/settings.json
file. It is perfect to dropping into a live Ghost blog. Run this command to create it:
grunt build
When in development you use the following command to build the CSS. It will initiate a service to watch for changes SCSS files and automatically recompile them for you.
grunt server
When you need to build the theme for distribution, run the following command. It will compress the CSS files for you.
grunt build
When creating a new project, you can run this command to create the custom SCSS files:
grunt init
To manually build the CSS in expanded formatting use:
grunt sass:dev
To manually build the CSS files in compressed format use:
grunt sass:dist
You can remove any key/value from this JSON file if you do not want the corresponding service file to be created.
This is automatically create from the THEME_NAME
. It can be overriden by adding it into the theme/settings.json
file.
The CSS files are built in "expanded" mode during development and are compressed when built using grunt build
.
Built as screen.css
.
This is the main CSS file used on the front it. It links to the other SCSS files to build the master CSS file for the front-end.
Built as post.css
.
This file should not be linked to in the theme. It is pulled into the screen.css
file during compilation.
This file should contain all styling directly related to how text inside of a post will look on the page. Ghost currently has plans to allow dynamic styling in the post editor and will use this file.
If you get an error when you first try to compile the SCSS, make sure that you created the following files:
- theme/assets/css/screen.custom.scss
- theme/assets/css/post.custom.scss
- grunt
- grunt-contrib-cssmin
- grunt-contrib-sass
- grunt-contrib-uglify
- grunt-contrib-watch
- bootstrap-sass
- modernizr
For more details on creating Ghost themes, you can find the official documentation at http://docs.ghost.org/themes/.
Released under the MIT license.