Displaying 1 to 1 from 1 results

gulp-nav - gulp plugin to help build navigation elements

  •    CoffeeScript

A gulp plugin to help build navigation or breadcrumb elements implicitly from our file structure. The goal is to be useful with e.g. Bootstrap .nav classes and your favorite templating system. (If you need templates, try Jade.) gulp-nav can handle Vinyl file objects with stream contents and with buffer contents. We know how to .pipe these through appropriate plugins and transforms, leaving us with a bunch of output pages in a similar directory hierarchy. What about links between those pages, however? We don't want to hardcode that stuff! While each file is piped through, an object stored as a property of the Vinyl file object, which stored object knows where other files are located and what they are called, could be really useful to template plugins. With that information, a template could be written to build navbars, breadcrumbs, or whatever we want on our generated page.