Trailing slash for search (#122)

Noted by a user on Discord that our search stopped working.

It appears that our new host is set up to redirect non-trailing slash paths to trailing slash paths, discarding the query parameters.

One option is to change it back, another is this PR which simply adds the trailing slash to the form action.

Co-authored-by: jolheiser <john.olheiser@gmail.com>
Reviewed-on: https://gitea.com/gitea/theme/pulls/122
Reviewed-by: pat-s <pat-s@noreply.gitea.io>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
John Olheiser 2023-02-22 00:31:22 +08:00
parent 7fb4df522b
commit aa3c84e28b
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@
</a>
{{ if eq .Site.Params.search "nav" }}
<!-- this works together with assets/js/search.js from the docs.gitea.io -->
<form action="{{ "search" | absLangURL }}">
<form action="{{ "search" | absLangURL }}/">
<input id="search-query" name="s" placeholder="Search" />
</form>
{{ end }}