The best starter theme with a modern front-end development workflow. Based on Sage, HTML5 Boilerplate, gulp, Bower, and Bootstrap.
JavaScript CSS HTML
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
assets
.bowerrc
.editorconfig
.eslintrc
.gitignore
.travis.yml
README.md
bower.json
gulpfile.js
humans.txt
index.html
package.json
robots.txt

README.md

Sage Starter

devDependency Status Build Status

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

Requirements

Prerequisite How to check How to install
Node.js >= 4.5 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 Sass and Less, 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

Installation

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

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. For best results, update to the latest version of npm: npm install -g npm@latest or use your favorite package manager like Homebrew.

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/"
  }
...

SVG support

Sage Starter has built-in SVG support! The preferred method for using SVG as implemented is an SVG sprite.

Usage

Make sure each SVG has an ID.

<svg xmlns="http://www.w3.org/2000/svg">
    <symbol id="twitter" viewBox="0 0 64 64">
        <title>Twitter</title>
        <path etc.../>
    </symbol>
</svg>

Save any SVG files you want to use into /assets/images/sprite and the build process will combine all of those images into /assets/images/sprite/sprite.svg.

To use in markup, apply the ID to an SVG's Use element.

<svg role="img" title="Twitter">
    <use xlink:href="map.svg#twitter"/>
</svg>

Check out SVG For Everybody for IE and <=Edge 12 support of SVG sprites.

Documentation

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

Contributing

Contributions are welcome and encouraged from everyone!