code: def build_static(self, *args, **options):
          
          logger.debug("Building static directory")
          if self.verbosity > 1:
              self.stdout.write("Building static directory")
          management.call_command(
              "collectstatic",
              interactive=False,
              verbosity=0
          )
  
          # Set the target directory inside the filesystem.
          target_dir = path.join(
              self.build_dir,
              settings.STATIC_URL.lstrip('/')
          )
          target_dir = smart_text(target_dir)
  
          if os.path.exists(self.static_root) and settings.STATIC_URL:
              if getattr(settings, 'BAKERY_GZIP', False):
                  self.copytree_and_gzip(self.static_root, target_dir)
              # if gzip isn't enabled, just copy the tree straight over
              else:
                  logger.debug("Copying {}{} to {}{}".format("osfs://", self.static_root, self.fs_name, target_dir))
                  copy.copy_dir("osfs:///", self.static_root, self.fs, target_dir)
  
          # If they exist in the static directory, copy the robots.txt
          # and favicon.ico files down to the root so they will work
          # on the live website.
          robots_src = path.join(target_dir, 'robots.txt')
          if self.fs.exists(robots_src):
              robots_target = path.join(self.build_dir, 'robots.txt')
              logger.debug("Copying {}{} to {}{}".format(self.fs_name, robots_src, self.fs_name, robots_target))
              self.fs.copy(robots_src, robots_target)
  
          favicon_src = path.join(target_dir, 'favicon.ico')
          if self.fs.exists(favicon_src):
              favicon_target = path.join(self.build_dir, 'favicon.ico')
              logger.debug("Copying {}{} to {}{}".format(self.fs_name, favicon_src, self.fs_name, favicon_target))
              self.fs.copy(favicon_src, favicon_target)
docs: Builds the static files directory as well as robots.txt and favicon.ico