mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-22 23:37:53 +00:00
search: search page not generated with renderer.unsafe=false #929
This commit is contained in:
parent
68d562d0db
commit
f4348298b5
3 changed files with 15 additions and 7 deletions
|
@ -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 }}
|
||||
|
|
|
@ -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>
|
|
@ -1 +1 @@
|
|||
7.0.0+007cc20686f04ca1f911975f20f097175dd72a7f
|
||||
7.0.0+68d562d0dbc7583b0ea01cec5f4e14be44c997df
|
Loading…
Reference in a new issue