diff --git a/.vuepress/client.js b/.vuepress/client.js index 30391c6b5d8..6c9e56bf648 100755 --- a/.vuepress/client.js +++ b/.vuepress/client.js @@ -10,6 +10,7 @@ import BlogPosts from './components/BlogPosts.vue'; import JumpToc from './components/JumpToc.vue'; import PrBy from './components/PrBy.vue'; import ReleaseToc from './components/ReleaseToc.vue'; +import URLDocSearch from './components/URLDocSearch.vue'; export default defineClientConfig({ enhance({ app }) { @@ -18,5 +19,8 @@ export default defineClientConfig({ app.component('JumpToc', JumpToc); app.component('PrBy', PrBy); app.component('ReleaseToc', ReleaseToc); + + // Override the builtin searchbox + app.component('SearchBox', URLDocSearch); }, }); diff --git a/.vuepress/components/URLDocSearch.vue b/.vuepress/components/URLDocSearch.vue new file mode 100644 index 00000000000..20cd3790266 --- /dev/null +++ b/.vuepress/components/URLDocSearch.vue @@ -0,0 +1,46 @@ + + + diff --git a/.vuepress/config.js b/.vuepress/config.js index b7dec6d00b1..bb256454d1c 100755 --- a/.vuepress/config.js +++ b/.vuepress/config.js @@ -110,6 +110,15 @@ export default defineUserConfig({ { name: 'apple-mobile-web-app-status-bar-style', content: 'black' }, ], ['link', { rel: 'icon', href: '/icon.png' }], + [ + 'link', + { + rel: 'search', + type: 'application/opensearchdescription+xml', + title: 'Nushell Docs', // NOTE: must match ShortName + href: '/opensearch.xml', + }, + ], ], markdown: { importCode: { diff --git a/.vuepress/public/opensearch.xml b/.vuepress/public/opensearch.xml new file mode 100644 index 00000000000..25ea0573de1 --- /dev/null +++ b/.vuepress/public/opensearch.xml @@ -0,0 +1,12 @@ + + Nushell Docs + Search Nushell documentation + UTF-8 + https://www.nushell.sh/icon.png + + + +