code: function htmlRenamer () {
    return (file) => {
      if (path.extname(file.info.dest) === '.html') {
        const filenameWithoutExtension = path.basename(file.info.dest).replace('.html', '')
        const rootPath = path.dirname(file.info.dest)
        return file.clone({
          info: file.info.clone({
            dest: filenameWithoutExtension === 'index' ? file.info.dest : path.join(rootPath, filenameWithoutExtension, 'index.html')
          })
        })
      } else {
        return file
      }
    }
  }
docs: renames name.html to name/index.html and leaves index.html as it is