search: search page not generated with renderer.unsafe=false #929

This commit is contained in:
Sören Weber 2024-10-15 15:43:00 +02:00
parent 68d562d0db
commit f4348298b5
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
3 changed files with 15 additions and 7 deletions

View file

@ -3,7 +3,7 @@
{{- $url := trim (or .Site.Params.searchPageURL "search") "/" }} {{- $url := trim (or .Site.Params.searchPageURL "search") "/" }}
{{- $content := dict {{- $content := dict
"mediaType" "text/markdown" "mediaType" "text/markdown"
"value" "{{% _relearn_searchform %}}" "value" ""
}} }}
{{- $page := dict {{- $page := dict
"content" $content "content" $content
@ -11,6 +11,7 @@
"outputs" (slice "html") "outputs" (slice "html")
"path" "_relearn_searchpage" "path" "_relearn_searchpage"
"title" (T "Search") "title" (T "Search")
"type" "_relearn_searchform"
"url" $url "url" $url
}} }}
{{- .AddPage $page }} {{- .AddPage $page }}

View file

@ -1,14 +1,17 @@
{{/*
This is an internal shortcode used for the dedicated search page; <article class="default">
it is undocumented and not meant to be used in your content files! <header class="headline">
*/ -}} {{- partial "content-header.html" . }}
</header>
{{ partial "heading-pre.html" . }}{{ partial "heading.html" . }}{{ partial "heading-post.html" . }}
<search> <search>
<form action="javascript:triggerSearch()"> <form action="javascript:triggerSearch()">
<div class="searchform"> <div class="searchform">
<label class="a11y-only" for="R-search-by-detail">{{ T "Search" }}</label> <label class="a11y-only" for="R-search-by-detail">{{ T "Search" }}</label>
<input data-search-input id="R-search-by-detail" class="search-by" name="search-by" type="search" placeholder="{{ T "Search-placeholder" }}"> <input data-search-input id="R-search-by-detail" class="search-by" name="search-by" type="search" placeholder="{{ T "Search-placeholder" }}">
{{- partial "shortcodes/button.html" (dict {{- partial "shortcodes/button.html" (dict
"page" .Page "page" .
"type" "submit" "type" "submit"
"style" "secondary" "style" "secondary"
"icon" "search" "icon" "search"
@ -22,3 +25,7 @@ it is undocumented and not meant to be used in your content files!
<hr> <hr>
<div id="R-searchresults"> <div id="R-searchresults">
</div> </div>
<footer class="footline">
{{- partial "content-footer.html" . }}
</footer>
</article>

View file

@ -1 +1 @@
7.0.0+007cc20686f04ca1f911975f20f097175dd72a7f 7.0.0+68d562d0dbc7583b0ea01cec5f4e14be44c997df