'search_enabled' ) ); CFSP_UI::toggle( 'search_excerpt', 'Include excerpts', array( 'show_if' => 'search_enabled', 'help' => 'Searches and shows the first 30 words of each post. Turn off to keep the index small on very large sites.', ) ); CFSP_UI::card_end(); CFSP_UI::card_start( 'Matching', 'Fuzzy, typo-tolerant search with Fuse.js ("recipies" finds "Recipes"). Bundled and self-hosted, about 26 KB, loaded only when someone searches. Very old browsers fall back to exact-word matching.', array( 'show_if' => 'search_enabled' ) ); ?>
'number', 'min' => 0, 'max' => 10, 'suffix' => '/ 10', 'help' => '0 = exact, 10 = matches almost anything. 3 is a good balance (Fuse.js threshold 0.3).', ) ); CFSP_UI::input( 'search_min_chars', 'Minimum characters', array( 'type' => 'number', 'min' => 1, 'max' => 5, 'help' => 'Start searching after this many characters.', ) ); CFSP_UI::input( 'search_limit', 'Maximum results', array( 'type' => 'number', 'min' => 5, 'max' => 100, ) ); ?>
cfsp-search.json, cfsp-search.js (and cfsp-fuse.js for Fuse.js) to the site and a script tag to every page. Links like /?s=hello open the overlay too. Run a full export after changing search settings.', 'tip' ); CFSP_UI::card_end();