Skip to content
/ sage Public
forked from roots/sage

WordPress starter theme based on HTML5 Boilerplate, gulp, Bower, and Bootstrap

License

Notifications You must be signed in to change notification settings

pederan/sage

 
 

Repository files navigation

Build Status devDependency Status

Sage is a WordPress starter theme based on HTML5 Boilerplate, gulp, Bower, and Bootstrap, that will help you make better themes.

Requirements

Prerequisite How to check How to install
PHP >= 5.4.x php -v php.net
Node.js 0.12.x node -v nodejs.org
gulp >= 3.8.10 gulp -v npm install -g gulp
Bower >= 1.3.12 bower -v npm install -g bower

For more installation notes, refer to the Install gulp and Bower section in this document.

Features

  • gulp build script that compiles both Less and Sass, checks for JavaScript errors, optimizes images, and concatenates and minifies files
  • BrowserSync for keeping multiple browsers and devices synchronized while testing, along with injecting updated CSS and JS into your browser while you're developing
  • Bower for front-end package management
  • asset-builder for the JSON file based asset pipeline
  • Bootstrap
  • Theme wrapper
  • HTML5 Boilerplate
    • The latest jQuery via Google CDN, with a local fallback
    • The latest Modernizr build for feature detection
    • An optimized Google Analytics snippet
  • ARIA roles and microformats
  • Cleaner HTML output of navigation menus
  • Posts use the hNews microformat
  • Multilingual ready and over 30 available community translations

Install the Soil plugin to enable additional features:

  • Cleaner output of wp_head and enqueued assets
  • Root relative URLs
  • Nice search (/search/query/)

Installation

Clone the git repo - git clone https://github.com/roots/sage.git and then rename the directory to the name of your theme or website.

If you don't use Bedrock, you'll need to add the following to your wp-config.php on your development installation:

define('WP_ENV', 'development');

Configuration

Edit lib/config.php to enable or disable theme features and to define a Google Analytics ID.

Edit lib/init.php to setup navigation menus, post thumbnail sizes, post formats, and sidebars.

Theme development

Sage uses gulp as its build system and Bower to manage front-end packages.

Install gulp and Bower

Building the theme requires node.js. We recommend you update to the latest version of npm: npm install -g npm@latest.

From the command line:

  1. Install gulp and Bower globally with npm install -g gulp bower
  2. Navigate to the theme directory, then run npm install
  3. Run bower install

You now have all the necessary dependencies to run the build process.

Available gulp commands

  • gulp — Compile and optimize the files in your assets directory
  • gulp watch — Compile assets when file changes are made
  • gulp --production — Compile assets for production (no source maps).

To use BrowserSync during gulp watch you need update devUrl at the bottom of assets/manifest.json to reflect your local development hostname.

Documentation

Sage documentation is available at https://roots.io/sage/docs/.

Contributing

Contributions are welcome from everyone. We have contributing guidelines to help you get started.

Community

Keep track of development and community news.

About

WordPress starter theme based on HTML5 Boilerplate, gulp, Bower, and Bootstrap

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 67.0%
  • JavaScript 26.2%
  • Gettext Catalog 4.5%
  • CSS 2.3%