Skip to content

Commit

Permalink
Workaround docsy issue with search page redirect google/docsy#1558
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Abraham <cjyabraham@gmail.com>
  • Loading branch information
cjyabraham committed Jun 11, 2024
1 parent 9861c22 commit 89f93b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion assets/js/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ limitations under the License.
}

var query = $(this).val();
document.location = "{{ "search/" | absURL }}?q=" + query;
var searchPage = $(this).data('search-page') + "?q=" + query;
document.location = searchPage;

return false;
});
Expand Down
1 change: 1 addition & 0 deletions layouts/partials/search-input.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<input
type="search"
name="q"
data-search-page="{{ "search/" | relLangURL }}"
class="search-input td-search-input"
placeholder="{{ T "ui_search_placeholder" }}"
aria-label="{{ T "ui_search_placeholder" }}"
Expand Down

0 comments on commit 89f93b0

Please sign in to comment.