diff --git a/CHANGELOG.md b/CHANGELOG.md
index d9036aed56..3da708f86e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,6 @@
+## 0.30.0+1
+* Fix a broken search box on pages in subdirectories (#2117, #2118)
+
## 0.30.0
* BREAKING CHANGE: no longer use `` in generated documentation, instead
use real relative links. This may break manually constructed links that rely
diff --git a/dartdoc_options.yaml b/dartdoc_options.yaml
index ccce8dfa31..5bdf9eb45e 100644
--- a/dartdoc_options.yaml
+++ b/dartdoc_options.yaml
@@ -1,4 +1,4 @@
dartdoc:
linkToSource:
root: '.'
- uriTemplate: 'https://github.com/dart-lang/dartdoc/blob/v0.30.0/%f%#L%l%'
+ uriTemplate: 'https://github.com/dart-lang/dartdoc/blob/v0.30.0+1/%f%#L%l%'
diff --git a/lib/resources/script.js b/lib/resources/script.js
index db4e525d26..152476ff3e 100644
--- a/lib/resources/script.js
+++ b/lib/resources/script.js
@@ -240,7 +240,9 @@ function initSearch(name) {
}
var jsonReq = new XMLHttpRequest();
- jsonReq.open('GET', 'index.json', true);
+ var scriptUrl = URI(document.getElementById("dartdoc_script_js").src);
+
+ jsonReq.open('GET', URI(scriptUrl.directory() + '/..').absoluteTo(scriptUrl) + '/index.json', true);
jsonReq.addEventListener('load', function() {
searchIndex = JSON.parse(jsonReq.responseText);
initTypeahead();
diff --git a/lib/src/version.dart b/lib/src/version.dart
index e7c1efd922..7f46e7b94d 100644
--- a/lib/src/version.dart
+++ b/lib/src/version.dart
@@ -1,2 +1,2 @@
// Generated code. Do not modify.
-const packageVersion = '0.30.0';
+const packageVersion = '0.30.0+1';
diff --git a/lib/templates/_footer.html b/lib/templates/_footer.html
index bac8322bab..afcc2cc97a 100644
--- a/lib/templates/_footer.html
+++ b/lib/templates/_footer.html
@@ -16,7 +16,7 @@
-
+