1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-06-26 03:06:25 +02:00
blog/README.md

54 lines
2.6 KiB
Markdown
Raw Normal View History

2013-11-21 00:54:28 +01:00
kremalicious3
2013-11-30 17:13:19 +01:00
==================
2013-11-20 23:33:58 +01:00
> [kremalicious.com](http://kremalicious.com) based on [Jekyll](http://jekyllrb.com). Neat.
2013-12-04 23:52:22 +01:00
2014-08-10 00:10:48 +02:00
[ ![Codeship Status for kremalicious/kremalicious3](https://www.codeship.io/projects/f6973090-9f04-0131-a2b7-625e8177ce9a/status?branch=master)](https://www.codeship.io/projects/18092) [![Dependency Status](https://www.versioneye.com/user/projects/53bbe331e1d158724400002e/badge.svg?style=flat)](https://www.versioneye.com/user/projects/53bbe331e1d158724400002e)
2014-07-03 19:38:00 +02:00
2013-11-20 23:33:58 +01:00
Requirements
------------------
2013-12-08 15:33:16 +01:00
You need to have the following tools installed on your development machine before moving on:
- [node.js](http://nodejs.org/) & [npm](https://npmjs.org/)
2013-12-04 23:52:22 +01:00
- [Bower](http://bower.io/)
2013-12-08 15:33:16 +01:00
- [Ruby](https://www.ruby-lang.org) (for sanity, install with [rvm](https://rvm.io/)) and [Bundler](http://bundler.io/)
2013-11-30 04:03:48 +01:00
2013-11-30 17:13:19 +01:00
Get up and running
------------------
2013-11-30 04:03:48 +01:00
2013-12-08 15:33:16 +01:00
For various reasons the assets build process and Jekyll site generation is managed through Grunt instead of `jekyll` or `rake`.
2013-12-15 14:29:37 +01:00
Both, `grunt server` and `grunt build`, use [grunt-jekyll](https://github.com/dannygarcia/grunt-jekyll) to first generate the site into the `_site` folder and the following Grunt tasks output into that folder. The build task copies everything over into the `_build`folder.
2013-12-08 15:33:16 +01:00
2014-07-03 19:38:00 +02:00
The `media` folder holding the source post images is excluded from Jekyll site generation and rsynced around from `_src/_media` to `_site/media` before site generation starts.
2013-12-08 15:33:16 +01:00
2013-12-11 21:14:17 +01:00
Image size generation for post teaser images and photos is done with [jekyll-picture-tag](https://github.com/robwierzbowski/jekyll-picture-tag), putting resized images into `_site/media/gen`.
2013-12-08 15:33:16 +01:00
### Install dependencies
Run the following command from the repository's root folder to install all dependencies.
2014-07-03 19:38:00 +02:00
```bash
2013-12-04 23:52:22 +01:00
npm install && bower install && bundle install
```
2013-11-30 04:03:48 +01:00
2013-12-08 15:33:16 +01:00
### Development build
This generates the site and assets with some Jekyll development options and starts a local dev server combined with a livereloading watch task under `http://localhost:1337`.
**[jekyll-picture-tag](https://github.com/robwierzbowski/jekyll-picture-tag) makes site generation very slow at the moment.** During development, uncommenting [some lines](https://github.com/kremalicious/kremalicious3/blob/master/_src/_plugins/picture_tag.rb#L142-L144) in that plugin's file speeds up regeneration dramatically. Seriously, from like 10 min. to 10 sec. Downside: no teaser images or photos in the development build.
2013-12-04 23:52:22 +01:00
```bash
grunt server
```
2013-11-30 17:13:19 +01:00
2013-12-08 15:33:16 +01:00
### Production build
2013-12-15 14:29:37 +01:00
Runs almost the same tasks as `grunt server` but puts everything into the `_build` directory, versions all assets and optimizes all image assets.
2013-12-08 15:33:16 +01:00
2013-12-04 23:52:22 +01:00
```bash
2013-12-08 15:33:16 +01:00
grunt build
2013-12-04 23:52:22 +01:00
```