wp-boilerplate is a simple WordPress starter theme and is licensed under the GNU General Public License (see COPYING for terms).
It provides support for building a WordPress theme using Jade, SASS and es6 javascript.
Gulp tasks are included for development (build - produces css maps, doesn't uglify/minify css or js files), production (dist - doesn't produce css maps, uglifies/minifies css,js and php files) and linting (checks). Gulp tasks will send errors to the console and continue.
To help prevent bloat in your created asset files, you should only include javascript files that are actually needed (as referenced in /gulpfile.js). You should only include CSS components that are actually needed (as referenced in src/sass/theme.scss).
Includes Typescript definition files for jQuery and Twitter Bootstrap.
Includes .vscode/tasks.json for use with Visual Studio Code. This allows you to run the npm build task using the key combination: cmd+shift+B or ctrl+shift+B.
Generated HTML from the compiled PHP pages validate with the W3C Markup Validation Service.
A11y tested for Headings, Contrast, Link text, Labels and image alt-text using tota11y in-Browser.
Makes use of Bootstrap's responsive components.
Installation requires node, Bower and Typings.
- clone the git repo to a local directory.
- Replace all occurences of 'custom_theme' in the src/static/pages/functions.php with the name of your theme.
- Replace all references to 'wp-boilerplate' in the src/static/pages/style.css with those of your theme.
- Install Nodejs, Bower and Typings if you haven't done so already.
Commands are run from the root directory of your cloned repository
- $ typings install
- installs definitions for jQuery and Bootstrap.
- $ bower install
- installs Bootstrap-sass (also includes jQuery) and Font-Awesome components.
- Requires the path to Git (e.g. C:\Program Files\Git\bin) to be added to the PATH system variable if installing on Windows
- $ npm install
- installs modules and runs the postinstall script to copy static files from /src to /dist, compile source files and run linting tasks.
- (remember; patience is a virtue!)
You can now zip up the dist/ folder and upload as a theme to your WordPress installation!
-
$ gulp publish
- use this optional Gulp task to copy files from the dist/ folder to the path you specify in the publishPath variable in gulpfile.js.
-
$ npm build
- watch for changes and compile source files as you edit then save them.
-
src/js/tools.js contains some unobtrusive example methods.
- If you want to use them, you should change the ROOT_URL variable at the top of src/js/tools.js to the url of you home page e.g. const ROOT_URL = "http://localhost/".
The following static files will be copied from /src/static to /dist:
- src/static/pages/
- functions.php
- wp_bootstrap_navwalker.php
- screenshot.png
- style.css
- -> /dist
- src/static/lang/
- default.pot
- -> /dist/languages
- The contents of this file may change considerably and is included purely as an example.
- default.pot
- src/static/js/
- shiv-respond.js
- -> /dist/assets/js
- shiv-respond.js
- src/static/img/
- avatar.png
- brand-logo.png
- favicon.ico
- -> /dist/assets/img
- src/static/fonts/
- fontawesome
- glyphicons
- -> /dist/assets/fonts
The following files are created from the Gulp build task:
- 404
- archive
- comments
- footer
- header
- index
- page
- page-home
- search
- searchform
- sidebar
- content
- content-none
- content-page
- theme.css
- theme.js
- theme.css.map
- Akismet
- Wordfence
- WP-DBManager
- iThemes Security
- Advanced Custom Fields
- Custom Post Type UI
- Contact Form 7
Copyright (C) 2016 Design-Fu.
wp-boilerplate is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 of the License.
wp-boilerplate is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with wp-boilerplate. If not, see http://www.gnu.org/licenses