     orders ?= 'order'
     hrefExtension ?= 'html'
     demoteTopIndex ?= no
-    rootPath ?= '/'               # XXX finish implementing this!
     # single options don't have to come wrapped in an Array
     sources = [ sources ] unless Array.isArray sources
     targets = [ targets ] unless Array.isArray targets

through = require 'through2'
  .obj

module.exports =
  ({sources, targets, titles, orders, hrefExtension, demoteTopIndex,
  rootPath}={}) ->
    # defaults
    sources ?= ['data', 'frontMatter']
    targets ?= ['nav', 'data.nav']

      title = (source[title] for title in titles).reduce (x, y) -> x ?= y
      order = (source[order] for order in orders).reduce (x, y) -> x ?= y
      # insert new nav into the tree
      nav = insertNavIntoTree file.relative, hrefExtension, title, order
      # set properties of vinyl object XXX does this need error handling?
      for target in targets
        obj = file
