diff --git a/config.ru b/config.ru index 24b0f492..bb685ce3 100644 --- a/config.ru +++ b/config.ru @@ -63,5 +63,5 @@ run Travis::Web::App.build( customer_io_site_id: ENV['CUSTOMER_IO_SITE_ID'], pro: ENV['TRAVIS_PRO'], code_climate: ENV['CODE_CLIMATE'], - code_climate_url: ENV['CODE_CLIMATE_URL'] + code_climate_url: ENV['CODE_CLIMATE_URL'], ) diff --git a/lib/travis/web/app.rb b/lib/travis/web/app.rb index 3a5ea66e..2f969c39 100644 --- a/lib/travis/web/app.rb +++ b/lib/travis/web/app.rb @@ -94,6 +94,7 @@ class Travis::Web::App else set_config(content, options) if config_needed?(file) set_title(content) if index?(file) + set_assets_host(content) if index?(file) headers = { 'Content-Length' => content.bytesize.to_s, @@ -158,6 +159,10 @@ class Travis::Web::App content.gsub!(/\{\{title\}\}/, ENV['SITE_TITLE'] || default_title) end + def set_assets_host(content) + content.gsub!(/\{\{assets_host\}\}/, ENV['ASSETS_HOST'] || '') + end + def set_config(string, opts = {}) string.gsub! %r(]*>) do %() diff --git a/public/index.html b/public/index.html index 673b0ae0..f15c5cb7 100644 --- a/public/index.html +++ b/public/index.html @@ -23,8 +23,8 @@ - - + +