1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-22 12:54:53 -05:00
forgejo/templates/repo/wiki/search.tmpl
Oto Šťáva 2374f8f47d Show page titles in wiki search results (#6048)
Replace wiki page filenames with page titles in the search results,
fixing the problem with them showing unreadable URI-encoded names.

(cherry picked from commit fc31fa0eeb)
2024-11-25 14:18:18 +00:00

12 lines
392 B
Go HTML Template

{{if .Results}}
{{range .Results}}
<a class="item tw-max-w-[80vw]" href="{{$.RepoLink}}/wiki/{{.Filename}}">
<b class="tw-block tw-mb-2 tw-whitespace-break-spaces">{{.Title}}</b>
{{range .LineCodes}}
<p class="tw-my-0 tw-whitespace-break-spaces">{{.}}</p>
{{end}}
</a>
{{end}}
{{else}}
<div class="item muted">{{ctx.Locale.Tr "repo.wiki.no_search_results"}}</div>
{{end}}