Download the PHP package distantnative/search-for-kirby without Composer
On this page you can find all versions of the php package distantnative/search-for-kirby. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download distantnative/search-for-kirby
More information about distantnative/search-for-kirby
Files in distantnative/search-for-kirby
Package search-for-kirby
Short Description Really find what you are looking for.
License MIT
Informations about the package search-for-kirby
⏸ Development ended - open to handover project
Unfortunately, I am lacking time and energy to actively uphold development of this plugin. I will archive the plugin as-is for the time being. Be aware that it doesn't support Kirby 3.6+. If anyone would like to take over and continue the development of this plugin, I'd be very happy - please get in touch.
Search for Kirby
Gettting started
Installation
Download, unzip and copy this repository to /site/plugins/search
.
Alternatively, you can install it with composer:
Decide which provider you want to use (see below for the available providers). And don't forget to create the index (also below) before the first run, if using the Sqlite or Algolia provider.
Updates
Replace the /site/plugins/search
folder with the new version. Make sure to read the release notes for breaking changes.
Or if you installed the plugin via composer, run:
Entries
The plugin offers a global search across different entries combined: pages
, files
and users
.
You can define what should be included as entries in the index (using the Kirby query language) or even disable a type completely in your site/config/config.php
:
By default the following collections are included in the index:
pages
files
users
Fields
You can define in your config.php
file which content fields of your pages, files and users to include in the search:
There are several options how to define fields in these arrays:
Templates
You can also define in your config.php
file which templates (or roles in the case of users) to include in the search:
php // simple whitelist array ['project', 'note', 'album']
// associative array [ 'project' => true, 'note' => false ]
// callback function function ($model) { return $model->intendedTemplate() !== 'secret'; } .php // site/config/config.php
'search' => [ 'provider' => 'sqlite', 'sqlite' => [ 'file' => dirname(DIR, 2) . '/storage/search/index.sqlite'
]
] yml sections: search: type: search bash ./site/plugins/search/bin/index
extension=sqlite3.so extension=pdo_sqlite.so
## Pay it forward 💛
This plugin is completely free and published under the MIT license. However, development needs time and effort. If you are using it in a commercial project or just want to support me to keep this plugin alive, please [make a donation of your choice](https://paypal.me/distantnative).