Use gulp plugins in Metalsmith, or Metalsmith plugins in gulp