diff --git a/README.md b/README.md index 7525957..f54f45f 100644 --- a/README.md +++ b/README.md @@ -12,23 +12,46 @@ Roots is a WordPress starter theme based on [HTML5 Boilerplate](http://html5boil ## Installation -Clone the git repo - `git clone git://github.com/roots/roots.git` - or [download it](https://github.com/roots/roots/zipball/master) and then rename the directory to the name of your theme or website. [Install Grunt](http://gruntjs.com/getting-started), and then install the dependencies for Roots contained in `package.json` by running the following from the Roots theme directory: +Clone the git repo - `git clone git://github.com/roots/roots.git` - or [download it](https://github.com/roots/roots/zipball/master) and then rename the directory to the name of your theme or website. +If you don't use [Bedrock](https://github.com/roots/bedrock), you'll need to add the following to your `wp-config.php` on your development installation: + +```php +define('WP_ENV', 'development'); ``` -npm install -``` + +## Theme activation Reference the [theme activation](http://roots.io/roots-101/#theme-activation) documentation to understand everything that happens once you activate Roots. -## Theme Development +## Compiling CSS and JavaScript -After you've installed Grunt and ran `npm install` from the theme root, use `grunt watch` to watch for updates to your LESS and JS files and Grunt will automatically re-build as you write your code. +Roots uses [Grunt](http://gruntjs.com/) for compiling LESS to CSS, checking for JS errors, live reloading, concatenating and minifying files, versioning assets, and generating lean Modernizr builds. + +To use it, install the required dependencies as directed and then run some Grunt commands. + +### Install Grunt + +From the command line: + +1. Install `grunt-cli` globally with `npm install -g grunt-cli`. +2. Navigate to the theme directory, then run `npm install`. npm will look at `package.json` and automatically install the necessary dependencies. It will also automatically run `bower install`, which references dependencies in `bower.json`. + +When completed, you'll be able to run the various Grunt commands provided from the command line. + +**Unfamiliar with npm? Don't have node installed?** [Download and install node.js](http://nodejs.org/download/) before proceeding. + +### Available Grunt commands + +* `grunt dev` — Compile LESS to CSS, concatenate and validate JS +* `grunt watch` — Compile assets when file changes are made +* `grunt build` — Create minified assets that are used on non-development environments ## Configuration -Edit `lib/config.php` to enable or disable support for various theme functions and to define constants that are used throughout the theme. +Edit `lib/config.php` to enable or disable support for various theme functions and to define constants. -Edit `lib/init.php` to setup custom navigation menus and post thumbnail sizes. +Edit `lib/init.php` to setup navigation menus, post thumbnail sizes, post formats, and sidebars. ## Documentation @@ -45,16 +68,19 @@ Edit `lib/init.php` to setup custom navigation menus and post thumbnail sizes. * HTML5 Boilerplate's markup along with ARIA roles and microformat * Bootstrap * [Grunt build script](http://roots.io/using-grunt-for-wordpress-theme-development/) +* Bower for front-end package management * [Theme activation](http://roots.io/roots-101/#theme-activation) * [Theme wrapper](http://roots.io/an-introduction-to-the-roots-theme-wrapper/) -* Root relative URLs * Cleaner HTML output of navigation menus -* Cleaner output of `wp_head` and enqueued scripts/styles -* Nice search (`/search/query/`) -* Image captions use `
` and `
` -* Example vCard widget * Posts use the [hNews](http://microformats.org/wiki/hnews) microformat -* [Multilingual ready](http://roots.io/wpml/) (Brazilian Portuguese, Bulgarian, Catalan, Danish, Dutch, English, Finnish, French, German, Hungarian, Indonesian, Italian, Korean, Macedonian, Norwegian, Polish, Russian, Simplified Chinese, Spanish, Swedish, Traditional Chinese, Turkish, Vietnamese, Serbian) +* [Multilingual ready](http://roots.io/wpml/) and over 30 available [community translations](https://github.com/roots/roots-translations) + +### Features from [Soil](https://github.com/roots/soil) + +* Root relative URLs +* Nice search (`/search/query/`) +* Cleaner output of `wp_head` and enqueued scripts/styles +* Image captions use `
` and `
` ## Contributing