I am using the Algolia plugin / way of indexing from the kirby Github repo at GitHub - getkirby/getkirby.com: Source code and content for the Kirby website
Until now I had only used $page in the config.php like here:
return [
'algolia' => [
'app' => 'XXXXXXXX',
'key' => $key,
'index' => 'kirby',
'fields' => [
"url" => function($page) {
return $page->url();
},
...
My issue now is, I need to include the urls and contents of files in the index.
The files should appear in the search as their own items.
To get everything in one place I have a kirby collection with all pages and files in one array.
But I am a bit unsure as to how to include it in the config for it to be indexed into Algolia.
If I add the necessary keys to my kirby collection, can I simply pass that to the ‘fields’ here instead of using function($page) for every key?