code: def includeme(config):
      
      log.info('Loading htmlmin pyramid plugin')
      for key, val in config.registry.settings.items():
          if key.startswith('htmlmin.'):
              log.debug('Setup %s = %s' % (key, val))
              htmlmin_opts[key[8:]] = asbool(val)
          if key.startswith('pyramid_htmlmin.'):
              log.debug('Setup %s = %s' % (key, val))
              opts[key[16:]] = asbool(val)
  
      config.add_tween('pyramid_htmlmin.htmlmin_tween_factory', under=INGRESS)
docs: Add pyramid_htmlmin n your pyramid include list.