       current.title = title ? current.title # overwrite defaults with non-nulls
       current.order = order ? current.order
       # use leaf to make the nav object
-      nav = navInContext current, [path]
+      nav = navInContext current, [path], root
       # set properties of vinyl object XXX does this need error handling?
       for target in targets
         obj = file

{basename} = require 'path'
through = require 'through2'
{relative, resolve} = require './web-path'

# XXX could these be somewhere else?
root = rootName = null

module.exports = ({sources, targets, titles, orders, skips, hrefExtension,
  demoteTopIndex}={}) ->

      exists: no
      title: null
    orderGen = 9999
    root = {}

    through.obj (file, encoding, transformCallback) ->
      # if vinyl objects have different properties, take first that exists
