Build Status devDependency Status

Thyme is a minimal Sage-based WordPress starter theme built with HTML5 Boilerplate, gulp, npm, and PostCSS that supports both Basscss and Tachyons for smoking fast, composable themes. The purpose of this project is to bring the principles of Functional CSS to the WordPress 🌎.

Requirements

  • PHP >= 5.4.x
  • Node.js 0.12.x
  • gulp >= 3.8.10

Features

  • gulp build script that compiles PostCSS, lints JavaScript, optimizes images, removes unused CSS with UnCSS, 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
  • npm for package management
  • asset-builder for the JSON file based asset pipeline
  • Theme wrapper
  • ARIA roles and microformats
  • Posts use the hNews microformat
  • Multilingual ready and over 30 available community translations

Theme installation

via WordPress Admin Panel

  1. Download the latest release of Thyme.
  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

Thyme uses gulp as its build system and npm to manage front-end packages.

Install gulp

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 globally with npm install -g gulp
  2. Navigate to the theme directory, then run npm 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.