         return
       callback null, new PostCSSPlugin(filepath, buffer.toString())
 
-  env.registerContentPlugin 'styles', '**/*.css', PostCSSPlugin
+  wintersmith.registerContentPlugin 'styles', '**/*.css', PostCSSPlugin
   callback()

path = require 'path'
postcss = require 'postcss'

module.exports = (env, callback) ->

  class PostCSSPlugin extends env.ContentPlugin

    constructor: (@_filepath, @_text) ->


          postcss(plugins)
            .process(@_text, options)
            .then (result) -> callback null, new Buffer(result.css)
            .catch (error) -> wintersmith.logger.error error.toString()

        catch error
          callback error
