         if Config.DEV || !meta.draft
           if meta.permalink == Config.index
             Logger.debug "  index: #{meta.permalink}"
-            Builder.render( thing, kind, 'index.html' )
+            Builder.render( meta.thing, kind, 'index.html' )
           Logger.debug( "  #{kind}: #{meta.permalink}" )
-          Builder.render thing, kind
+          Builder.render meta.thing, kind
         else
           Logger.debug( "  skipped: #{thing}" )
     process = ( kind ) ->

  Logger.config Config

Builder.render = ( path, kind, pathOverride=null ) ->
  meta = _.clone( global["#{kind.toUpperCase()}_INFO"][path] )
  dir = "#{CWD}/build/#{meta.permalink}"
  mkdir_p dir, 0777, ( err ) ->
    if err

              meta.path += '/'
            meta.permalink = "#{meta.path}#{meta.filename}"

            meta.thing = "#{meta.permalink}.#{meta.extension}"

            if kind == 'post'
              dateFields = _.map(meta.date.split('.').reverse(), (f) -> parseInt(f, 10))
