code: def interlink_static_files(generator):
      '''Add links to static files in the main site if necessary'''
      if generator.settings['STATIC_PATHS'] != []:
          return                               # customized STATIC_PATHS
      try: # minimize attr lookup
          static_content = generator.context['static_content']
      except KeyError:
          static_content = generator.context['filenames']
      relpath = relpath_to_site(generator.settings['DEFAULT_LANG'], _MAIN_LANG)
      for staticfile in _MAIN_STATIC_FILES:
          if staticfile.get_relative_source_path() not in static_content:
              staticfile = copy(staticfile) # prevent override in main site
              staticfile.override_url = posixpath.join(relpath, staticfile.url)
              try:
                  generator.add_source_path(staticfile, static=True)
              except TypeError:
                  generator.add_source_path(staticfilef interlink_static_files(generator):
      '''Add links to static files in the main site if necessary'''
      if generator.settings['STATIC_PATHS'] != []:
          return                               # customized STATIC_PATHS
      try: # minimize attr lookup
          static_content = generator.context['static_content']
      except KeyError:
          static_content = generator.context['filenames']
      relpath = relpath_to_site(generator.settings['DEFAULT_LANG'], _MAIN_LANG)
      for staticfile in _MAIN_STATIC_FILES:
          if staticfile.get_relative_source_path() not in static_content:
              staticfile = copy(staticfile) # prevent override in main site
              staticfile.override_url = posixpath.join(relpath, staticfile.url)
              try:
                  generator.add_source_path(staticfile, static=True)
              except TypeError:
                  generator.add_source_path(staticfile)
docs: Add links to static files in the main site if necessary