search: generate warnings for unsupported output formats #888

This commit is contained in:
Sören Weber 2024-09-25 22:50:59 +02:00
parent fe70bb4e46
commit d6186c0b6d
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
2 changed files with 22 additions and 1 deletions

View file

@ -15,6 +15,24 @@
permalinkable = false
noUgly = true
# unused since 7.0.0 but left in here to generate warnings
[outputFormats.search]
name= "search"
baseName = "index.searchindex"
isHTML = true
mediaType = 'text/html'
permalinkable = false
noUgly = true
# unused since 7.0.0 but left in here to generate warnings
[outputFormats.searchpage]
name= "searchpage"
baseName = "index.searchpage"
isHTML = true
mediaType = 'text/html'
permalinkable = false
noUgly = true
[params.relearn.dependencies]
[params.relearn.dependencies.mathjax]
name = "MathJax"

View file

@ -2,7 +2,10 @@
{{- $assetBusting := partialCached "assetbusting.gotmpl" . }}
{{- $link := "" }}
{{- with .Site.Home.OutputFormats.Get "json" }}
{{- warnf "UNSUPPORTED usage of 'json' output format found, use 'search' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/releasenotes/6/#6-0-0" }}
{{- warnf "UNSUPPORTED usage of 'json' output format found, remove it from your config; see https://mcshelby.github.io/hugo-theme-relearn/basics/releasenotes/7/#7-0-0" }}
{{- end }}
{{- with .Site.Home.OutputFormats.Get "search" }}
{{- warnf "UNSUPPORTED usage of 'search' output format found, remove it from your config; see https://mcshelby.github.io/hugo-theme-relearn/basics/releasenotes/7/#7-0-0" }}
{{- end }}
{{- with .Site.Home.OutputFormats.Get "searchpage" }}
{{- warnf "UNSUPPORTED usage of 'searchpage' output format found, remove it from your config; see https://mcshelby.github.io/hugo-theme-relearn/basics/releasenotes/7/#7-0-0" }}