Skip to content
forked from welaika/wordless

All the power of Pug, Sass, Coffeescript and WebPack in your WordPress theme. Stop writing themes like it's 1998.

Notifications You must be signed in to change notification settings

wecobble/wordless

 
 

Repository files navigation

Wordless logo

Wordless is an opinionated WordPress plugin that dramatically speeds up and enhances your custom themes creation. Some of its features are:

  • A structured, organized and clean theme organization
  • Bootstrap a new theme directly within wp-cli
  • Write PHP templates with Pug templating system
  • Write CSS stylesheets using the awesome Sass syntax
  • Write Javascript logic in Coffeescript
  • A growing set of handy and documented PHP helper functions ready to be used within your views
  • Development workflow backed by WebPack, BrowserSync (with live reload), WP-CLI, Yarn. All the standards you already know, all the customizations you may need.

Build Status

Getting started

Prerequisites

  1. Install WP-CLI http://wp-cli.org/#installing
  2. Install global packages from NPM: npm install -g foreman yarn

Once done, considered you have a standard Wordpress installation already up and running and you are in its root directory:

  1. wp plugin install wordless
  2. wp plugin activate wordless
  3. wp wordless theme create mybrandnewtheme
  4. cd wp-content/themes/mybrandnewtheme
  5. yarn install

Now you have all you need to start developing 💻; just be sure to be in your theme directory and run

yarn run server

webpack, php server and your browser will automatically come up and serve your needs :)

GiT and Deployment

Wordless 2.x is backed by WebPack for all code automation tasks (compiling, but it's up to you to eventually extend it to other behaviours - image optimization will probably be v2.1 goal). As a general advice on a default Wordless installation you should add screen.css and application.js your .gitignore.

Those compiled assets must obviously be deployed on remote server.

PUG templates are compiled by the WP plugin at runtime and cached in theme's tmp folder. So just gitignore tmp/* and no other worries.

As a result we provide a minimal .gitignore inside theme's folder:

tmp/
!tmp/README.mdown
application.js
screen.css
node_modules

Insights

How does it works - Basic concepts (WIP)

Wordless theme anatomy - Structure and conventions

Additional recommended plugins and tools

Wordless is not meant to be a bloated, all-included tool. This is why we recommend adding some other plugins to get the most out of your beautiful WP developer life.

  • We are developing Wordless-extender. A little plugin, that brings our collection of favorite plugins and let you set up some constants in wp-config.php useful in hardening the WP installation. At the moment is not yet well documented and absent from wordpress.org repository, but we are moving fast, so keep follow!

  • Wordmove: a great gem (from yours truly) to automatically mirror local WordPress installations and DB data back and forth from your local development machine to the remote staging server;

  • Wordless-gem: the CLI sheriff for your Wordless theme! Compile and clean assets, create new WP installation, a new wordless theme and let you set up a deploy command in order to easily deploy your site, collaborating with Wordmove, with a wordless deploy (warning: with the advent of Wordless 2.x some wordless-gem's functions are no more useful. We are in the process to imagine its future deveopment path)

Known problems and limitations

  • Wordless has not been tested on Windows machines
  • The routing part can be drammaticaly improved to make it more readable and DRY
  • This is go-ahead software, everything is subject to change :) but you can pull code from tagged commits (stable)

Inline code documentation

You can find it here. If you are intrested in contribuing to the documentation:

  • we are documenting the following at the moment (path recursive)
wordless/helpers/*
wordless/helpers/placeholder_images/*
wordless/helpers/templates/*
vendor/mobile_detect.php
  • here is a list of documentation holes :9
  • go and add doc following the doxygen guides
  • pull-request your commits
  • we'll recompile the doxygen doc
  • the community will be grateful!

Localization

Wordless is available in English, German, Greek, Italian and Spanish, at the moment.

The user interface was translated by Wasilis Mandratzis-Walz (German and Greek), David Mejorado (Spanish).

Your help is welcome! Add your own language using Transifex.

Need more tools?

Visit Wordpress Tools.

Third Part Libraries

Author

made with ❤️ and ☕️ by weLaika

License

(The MIT License)

Copyright © 2013-2015 weLaika

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

All the power of Pug, Sass, Coffeescript and WebPack in your WordPress theme. Stop writing themes like it's 1998.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 92.7%
  • HTML 2.1%
  • XSLT 1.9%
  • JavaScript 1.5%
  • Shell 0.9%
  • CSS 0.7%
  • Other 0.2%