Skip to content

Latest commit

 

History

History
146 lines (103 loc) · 6.24 KB

README.md

File metadata and controls

146 lines (103 loc) · 6.24 KB

#BourbonSage BourbonSage is a fork of Sage that uses Bourbon, Neat, & Bitters in place of Bootstrap.

Bourbon & Neat are included via Bower. Bitters is not a library, like Bourbon and Neat, and was built to be changed. As such it is included directly in the themes scss files.

Build Status devDependency Status

Sage is a WordPress starter theme based on HTML5 Boilerplate, gulp, Bower, and Bootstrap Sass, 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 4.5.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

Install the Soil plugin to enable additional features:

  • Cleaner output of wp_head and enqueued assets
  • Cleaner HTML output of navigation menus
  • Root relative URLs
  • Nice search (/search/query/)
  • Google CDN jQuery snippet from HTML5 Boilerplate
  • Google Analytics snippet from HTML5 Boilerplate

See a complete working example in the roots-example-project.com repo.

Theme installation

Bottom line is you want to get the files in this repo into your local development environment. There are many ways to do this, two of which we will cover here.

via Command-line

If you're already using Composer to manage WordPress, then you might consider using composer's create-project command to download Sage.

The example below assumes you're using Bedrock. If you're not, simply change the target path accordingly.

composer create-project roots/sage web/app/themes/your-theme-name-here

Then activate the theme via wp-cli.

wp theme activate your-theme-name-here

via WordPress Admin Panel

  1. Download the latest release of Sage.
  2. In your WordPress admin panel, navigate to Appearance->Themes
  3. Click Add New
  4. Click Upload Theme
  5. Upload the zip file that you downloaded.

Theme setup

Edit lib/setup.php to enable or disable theme features, 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).

Using BrowserSync

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

For example, if your local development URL is http://project-name.dev you would update the file to read:

...
  "config": {
    "devUrl": "http://project-name.dev"
  }
...

If your local development URL looks like http://localhost:8888/project-name/ you would update the file to read:

...
  "config": {
    "devUrl": "http://localhost:8888/project-name/"
  }
...

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.