src/stylesheets
: Put your SASS files here. Will be compiled intopublic/src
;src/views
: Put your HAML views here. These are compiled using PHamlP, so check its documentation to know everything about its (little) syntax differences;public/images
: Put here all the theme's images. SASS will recognize them properly if you use theimage-url()
helper;index.php
: That's the default WP entrypoint. Callrender_view('view_name')
to.. well.. render the views you need. You can replicate the same behaviour onsingle.php
,page.php
, etc, or you can put everything inindex.php
and check what's the current page with all theis_XXX()
WP functions;helpers.php
: Your views should contain less PHP code as possible (that's why HAML makes it so hard to write it). If you need to do something bigger than 3 rows, then refactor it. Transform it into a function and place it in this file. Please, review thelib/helpers.php
file in order to see all the helpers this theme already provides you;init/*.php
: All the Wordpress initializations must be placed here. A few initializers are already provided:custom_fields.php
,custom_post_types.php
,hooks.php
andsite_options.php
functions.php
: Do not touch this file, unless you need to require a newinit/*.php
file.
cd my_wordpress_installation/wp-content/themes
git clone git://github.com/welaika/wp_sass_haml.git my_brand_new_theme
cd my_brand_new_theme
bundle install
bundle exec guard
Now your SASS files are guarded, and will be compiled as soon as you save them.