{{ title }}
+ {%- if site_search_base %}
+
+
+
+ {%- endif %}
diff --git a/src/sphinx/_sphinx/themes/sbt/static/docs.css b/src/sphinx/_sphinx/themes/sbt/static/docs.css
index 1dfea41fc..053c3ba26 100644
--- a/src/sphinx/_sphinx/themes/sbt/static/docs.css
+++ b/src/sphinx/_sphinx/themes/sbt/static/docs.css
@@ -192,4 +192,19 @@ a.headerlink:hover {
div.doc-howto-summary h3 {
color: rgb(13, 36, 40);
-}
\ No newline at end of file
+}
+
+.search-box {
+ float: right;
+ margin-bottom: -15px;
+ margin-top: -15px;
+}
+form#search {
+ margin: 0px;
+}
+input#submit-search {
+ display: none;
+}
+input#search-input {
+ margin: 0px;
+}
diff --git a/src/sphinx/conf.py b/src/sphinx/conf.py
index b6123f56e..ab92190e8 100644
--- a/src/sphinx/conf.py
+++ b/src/sphinx/conf.py
@@ -31,6 +31,21 @@ html_show_sphinx = False
htmlhelp_basename = 'sbtdoc'
html_use_smartypants = False
+# if true:
+# the Home link is to scala-sbt.org
+# if false:
+# the Home link is to home.html for the current documentation version
+# TODO: pass this as an argument to sphinx
+home_site = True
+
+# Passed to Google as site:
+# If empty, no search box is included
+# TODO: pass this as an argument to sphinx, use actual version instead of release
+site_search_base = 'http://www.scala-sbt.org/release/docs'
+
+# passes variables to the template
+html_context = {'home_site': home_site, 'site_search_base': site_search_base}
+
# Issues role
issuetracker = 'github'