https://docsearch.algolia.com/docs/DocSearch-v3#preconnect Only when the search is enabled in the page We probably needs to create an handlebar helper/macro to easily detect when the search is enabled. Even if we don't implement pre-connect, this will make the templates more readable The detection logic is currently duplicated at least twice.