diff --git a/lib/travis/web/app.rb b/lib/travis/web/app.rb index f440670f..39b5317a 100644 --- a/lib/travis/web/app.rb +++ b/lib/travis/web/app.rb @@ -83,6 +83,8 @@ class Travis::Web::App def response_for(file, options = {}) content = File.read(file) set_config(content, options) if config_needed?(file) + set_title(content) if index?(file) + headers = { 'Content-Length' => content.bytesize.to_s, 'Cache-Control' => cache_control(file), @@ -134,6 +136,11 @@ class Travis::Web::App Rack::Mime.mime_type File.extname(file) end + def set_title(content) + default_title = "Travis CI - Free Hosted Continuous Integration Platform for the Open Source Community" + content.gsub!(/\{\{title\}\}/, ENV['SITE_TITLE'] || default_title) + end + def set_config(string, opts = {}) string.gsub! %r(]*>) do %() diff --git a/public/index.html b/public/index.html index 6316c6f7..673b0ae0 100644 --- a/public/index.html +++ b/public/index.html @@ -17,7 +17,7 @@ -