docs: def minify_file(self, target):
          """
          Minifies the target html file.
          """
          html = open(target, 'rb').read()
          enc = chardet.detect(html)['encoding']
          with codecs.open(target, 'r+', enc) as f:
              result = htmlmin.minify(f.read(), **self.options)
              f.seek(0)
              f.write(result)
              f.truncate()