mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-26 17:23:05 +00:00
17 lines
No EOL
467 B
Go Template
17 lines
No EOL
467 B
Go Template
{{- if and (not .Site.Params.disableSearchIndex) (not .Site.Params.disableSearchPage) }}
|
|
{{- .EnableAllLanguages }}
|
|
{{- $url := trim (or .Site.Params.searchPageURL "search") "/" }}
|
|
{{- $content := dict
|
|
"mediaType" "text/markdown"
|
|
"value" "{{% _relearn_searchform %}}"
|
|
}}
|
|
{{- $page := dict
|
|
"content" $content
|
|
"kind" "page"
|
|
"outputs" (slice "html")
|
|
"path" "_relearn_searchpage"
|
|
"title" (T "Search")
|
|
"url" $url
|
|
}}
|
|
{{- .AddPage $page }}
|
|
{{- end }} |