def interlink_static_files(generator):
 if (generator.settings['STATIC_PATHS'] != []):
  return
 filenames = 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 filenames):
   staticfile = copy(staticfile)
   staticfile.override_url = posixpath.join(relpath, staticfile.url)
   generator.add_source_path(staticfile)

def interlink_static_files ( generator ) : if ( generator . settings [ 'STATIC_PATHS' ] != [ ] ) : return filenames = 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 filenames ) : staticfile = copy ( staticfile ) staticfile . override_url = posixpath . join ( relpath , staticfile . url ) generator . add_source_path ( staticfile )
add links to static files in the main site if necessary .