mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-12-02 20:23:06 +00:00
18 lines
No EOL
471 B
Go Template
18 lines
No EOL
471 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" ""
|
|
}}
|
|
{{- $page := dict
|
|
"content" $content
|
|
"kind" "page"
|
|
"outputs" (slice "html")
|
|
"path" "_relearn_searchpage"
|
|
"title" (T "Search")
|
|
"type" "_relearn_searchform"
|
|
"url" $url
|
|
}}
|
|
{{- .AddPage $page }}
|
|
{{- end }} |