Skip to content

Commit

Permalink
search: search page not generated with renderer.unsafe=false #929
Browse files Browse the repository at this point in the history
  • Loading branch information
McShelby committed Oct 15, 2024
1 parent 68d562d commit f434829
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
3 changes: 2 additions & 1 deletion content/_relearn/searchpage/_content.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
{{- $url := trim (or .Site.Params.searchPageURL "search") "/" }}
{{- $content := dict
"mediaType" "text/markdown"
"value" "{{% _relearn_searchform %}}"
"value" ""
}}
{{- $page := dict
"content" $content
"kind" "page"
"outputs" (slice "html")
"path" "_relearn_searchpage"
"title" (T "Search")
"type" "_relearn_searchform"
"url" $url
}}
{{- .AddPage $page }}
Expand Down
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -22,3 +25,7 @@
<hr>
<div id="R-searchresults">
</div>
<footer class="footline">
{{- partial "content-footer.html" . }}
</footer>
</article>
2 changes: 1 addition & 1 deletion layouts/partials/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.0.0+007cc20686f04ca1f911975f20f097175dd72a7f
7.0.0+68d562d0dbc7583b0ea01cec5f4e14be44c997df

0 comments on commit f434829

Please sign in to comment.