From: XhmikosR Date: Mon, 17 Feb 2020 16:20:24 +0000 (+0200) Subject: Make OpenSearch an output format. X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=ed8c28a835c97f3ff73322e596c1e33aaaa46c2f;p=thirdparty%2Fbootstrap.git Make OpenSearch an output format. Not sure if there's another way to do this... --- diff --git a/hugo.yml b/hugo.yml index 17f8b7b680..c3b566d1e8 100644 --- a/hugo.yml +++ b/hugo.yml @@ -28,6 +28,18 @@ enableRobotsTXT: true metaDataFormat: "yaml" disableKinds: ["404", "taxonomy", "term", "RSS"] +outputFormats: + OpenSearch: + baseName: opensearch + isPlainText: true + mediaType: application/xml + notAlternative: true + +outputs: + home: + - HTML + - OpenSearch + publishDir: "_site" module: diff --git a/site/layouts/_default/list.opensearch.xml b/site/layouts/_default/list.opensearch.xml new file mode 100644 index 0000000000..a64e0daeec --- /dev/null +++ b/site/layouts/_default/list.opensearch.xml @@ -0,0 +1,7 @@ + + + {{ .Site.Title }} + Search {{ .Site.Title }} documentation + {{ (printf "/docs/%s/assets/img/favicons/favicon.ico" .Site.Params.docs_version) | absURL }} + + diff --git a/site/layouts/partials/header.html b/site/layouts/partials/header.html index a7ad916ee8..15047233cf 100644 --- a/site/layouts/partials/header.html +++ b/site/layouts/partials/header.html @@ -10,7 +10,10 @@ {{ if .IsHome }}{{ .Site.Title | markdownify }} · {{ .Site.Params.subtitle | markdownify }}{{ else }}{{ .Title | markdownify }} · {{ .Site.Title | markdownify }} v{{ .Site.Params.docs_version }}{{ end }} - + +{{ with .OutputFormats.Get "opensearch" -}} + +{{ end -}} diff --git a/site/static/documentation-search.xml b/site/static/documentation-search.xml deleted file mode 100644 index 9fdd82d496..0000000000 --- a/site/static/documentation-search.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - Bootstrap Documentation - Search in the latest Bootstrap documentation - https://deploy-preview-29872--twbs-bootstrap.netlify.com/favicon.ico - -