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") "/" }}
{{- $content := dict
"mediaType" "text/markdown"
"value" "{{% _relearn_searchform %}}"
"value" ""
}}
{{- $page := dict
"content" $content
@ -11,6 +11,7 @@
"outputs" (slice "html")
"path" "_relearn_searchpage"
"title" (T "Search")
"type" "_relearn_searchform"
"url" $url
}}
{{- .AddPage $page }}

View file

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

View file

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