Overview
LaRecipe supports two different search engines: algolia, internal. The internal engine can be very useful if you have a private documentation since algolia DocSearch is free only for open-source projects.
However, the internal engine has limited power compared to algolia since it only indexes the titles of the pages and their headings.
Enable Search
You can enable search functionality simply by activating the enabled option inside the config/larecipe.php file.
Once activated, the search button will appear at the top-right of the navbar. Also, you can trigger the search panel by typing s 😼
return [
'search' => [
'enabled' => false,
...
]
];Available Engines
You can choose the internal search engine by assigning the default option to internal. You can also configure the indexable nodes so they will appear in the search results.
return [
'search' => [
'enabled' => true,
'default' => 'internal',
'engines' => [
'internal' => [
'index' => ['h2', 'h3']
],
...
]
]
]Algolia DocSearch requires you to submit your site to them for indexing before it starts working.
For more information, refer to Algolia DocSearch's documentation
return [
'search' => [
'enabled' => true,
'default' => 'algolia',
'engines' => [
...
'algolia' => [
'key' => 'your_algolia_key',
'index' => 'your_algolia_index'
]
]
]
];