Many changes to append relative links to static resources