haddowg / canvas
Canvas is a WordPress starter theme based on HTML5 Boilerplate & Bootstrap that will help you make better themes.
Installs: 16
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 3 055
Type:wordpress-theme
Requires
- php: >=5.4.0
- composer/installers: ~1.0
This package is not auto-updated.
Last update: 2024-11-23 17:27:35 UTC
README
Canvas is a WordPress starter theme based on HTML5 Boilerplate & Bootstrap that will help you make better themes.
Features
- Grunt for compiling LESS to CSS, checking for JS errors, live reloading, concatenating and minifying files, versioning assets, and generating lean Modernizr builds
- Bower for front-end package management
- HTML5 Boilerplate
- The latest jQuery via Google CDN, with a local fallback
- The latest Modernizr build for feature detection, with lean builds with Grunt
- An optimized Google Analytics snippet
- Bootstrap
- Organized file and template structure
- ARIA roles and microformats
- Theme activation
- Theme wrapper
- Cleaner HTML output of navigation menus
- Posts use the hNews microformat
Additional features
Install the Soil plugin to enable additional features:
- Root relative URLs
- Nice search (
/search/query/
) - Cleaner output of
wp_head
and enqueued assets markup
Installation
Clone the git repo - git clone git://github.com/haddowg/canvas.git
- or download it and then rename the directory to the name of your theme or website.
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
Canvas uses Grunt for compiling LESS to CSS, checking for JS errors, live reloading, concatenating and minifying files, versioning assets, and generating lean Modernizr builds.
Install Grunt and Bower
Unfamiliar with npm? Don't have node installed? Download and install node.js before proceeding.
From the command line:
- Install
grunt-cli
andbower
globally withnpm install -g grunt-cli bower
. - Navigate to the theme directory, then run
npm install
. npm will look atpackage.json
and automatically install the necessary dependencies. It will also automatically runbower install
, which installs front-end packages defined inbower.json
.
When completed, you'll be able to run the various Grunt commands provided from the command line.
N.B.
You will need write permission to the global npm directory to install grunt-cli
and bower
. You will also likely have to be using an elevated terminal or prefix the command with sudo
, i.e., sudo npm install -g grunt-cli bower
.
We also advise against running as root user. NPM deliberately uses limited privileges when executing certain commands such as those included in the Canvas post-install process, and when this happens to the root user, any file system objects that are not expressly writable by the root user will fail to write during the execution of the command. These might include directories such as /var/www
or /home/someotheruser
. If you're running as root and have problems, don't say we didn't warn you.
Available Grunt commands
grunt dev
— Compile LESS to CSS, concatenate and validate JSgrunt watch
— Compile assets when file changes are madegrunt build
— Create minified assets that are used on non-development environments