feat: search engine config for search bar without javascript

This commit is contained in:
grassblock 2025-05-23 18:00:42 +08:00
parent b695fe9fd5
commit e605e4ed42
2 changed files with 20 additions and 3 deletions

View file

@ -7,9 +7,10 @@ export const siteConfig = {
noClientJavaScript: false, // disable client-side javascript, this will:
// 1. disable all built-in client-side javascript from rendering
// 2. the full text search will be redirected to a search engine
// 3. the comments will be replaced with email reply
// 3. the comments will be globally disabled
// 4. the night mode & back to top will not use Javascript to function
// 5. the neko will be force-disabled
authorDefaultEmail: '',
// site components
navBarItems: [
// additional items in the navbar
@ -18,6 +19,9 @@ export const siteConfig = {
{ text: "RSS", link: "/rss.xml" },
{ text: "GitHub", link: "https://github.com/GrassBlock1/mercury" },
],
// search
// This only works when noClientJavaScript is enabled
searchEngine: 'bing', // 'google', 'duckduckgo', 'bing'(broken until M1cr0$0ft get support for it), defaults to 'google'
// footer
// yes you can write html safely here
customFooter: '<i>I have no mouth, and I must SCREAM</i>',