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") "/" }}
|
{{- $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 }}
|
||||||
|
|
|
@ -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>
|
|
@ -1 +1 @@
|
||||||
7.0.0+007cc20686f04ca1f911975f20f097175dd72a7f
|
7.0.0+68d562d0dbc7583b0ea01cec5f4e14be44c997df
|
Loading…
Reference in a new issue