From 5521173ea0e05bda93096b51f67c5e813cb1d87e Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 15 May 2024 20:17:06 +0200 Subject: feat: add browser search engines via opensearch description https://developer.mozilla.org/en-US/docs/Web/OpenSearch --- frontend/templates/blocks/search.gotmpl | 2 +- frontend/templates/index.gotmpl | 10 +++++++++- frontend/templates/opensearch.xml.gotmpl | 16 ++++++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 frontend/templates/opensearch.xml.gotmpl (limited to 'frontend') diff --git a/frontend/templates/blocks/search.gotmpl b/frontend/templates/blocks/search.gotmpl index 3ad05bf..6f47df3 100644 --- a/frontend/templates/blocks/search.gotmpl +++ b/frontend/templates/blocks/search.gotmpl @@ -11,6 +11,6 @@ {{- end }} {{- end }} -{{- define "js" }} +{{- define "head" }} {{- end }} diff --git a/frontend/templates/index.gotmpl b/frontend/templates/index.gotmpl index 6db4cc2..90f875b 100644 --- a/frontend/templates/index.gotmpl +++ b/frontend/templates/index.gotmpl @@ -6,9 +6,17 @@ Searchix - {{ block "js" . }} + {{ block "head" . }} {{ end }} {{ .ExtraHeadHTML }} + {{- range $key, $value := .Sources }} + + {{- end }}
diff --git a/frontend/templates/opensearch.xml.gotmpl b/frontend/templates/opensearch.xml.gotmpl new file mode 100644 index 0000000..8d978ea --- /dev/null +++ b/frontend/templates/opensearch.xml.gotmpl @@ -0,0 +1,16 @@ + + Searchix {{ .Source.Name }} + Search {{ .Source.Name }} options with Searchix + Search options {{ .Source.Name }} + + {{ .BaseURL }}/options/{{ .Source.Key }}/search + -- cgit 1.4.1