gulp-indexify makes Clean URLs by leveraging standard directory indexes.
convert any of:
by actually creating
and relying upon the standard directory index of most web servers. This makes it simpler to change server-side technologies in the future and is better for SEO.
var gulp = ;var indexify = ;gulp
Options can be passed to gulp-indexify:
// ... code snippet from examplereturn gulp;// ... code snippet from example
Accepts a string or array of strings representing the file
extension(s) for the files to rename. When renaming, the file extension is preserved, just the base file name is changed to index. Note that the dot for the file extension must be included. Default:
about/index.aspx. But ignores
Since we are moving the HTML pages down a level in
the path, relative URLs in the HTML will need to be rewritten. When this
option is set to true that rewriting is done by
But leaves untouched/ignores:
<!-- root relative URLs --><!-- absolute URLs -->