Download the PHP package hamaka/silverstripe-typesense without Composer
On this page you can find all versions of the php package hamaka/silverstripe-typesense. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hamaka/silverstripe-typesense
More information about hamaka/silverstripe-typesense
Files in hamaka/silverstripe-typesense
Package silverstripe-typesense
Short Description Typesense integration for Silverstripe CMS
License MIT
Informations about the package silverstripe-typesense
Silverstripe Typesense
Full-page Typesense search for Silverstripe CMS 5. The module indexes each page as a visitor sees it, so content from elements, blocks and templates is searchable too, not only the Content field. It also ships an instant-search overlay that shows results while you type.
It is built on top of elliotsawyer/silverstripe-typesense, which provides the Typesense client, the collection models and the CMS admin.
How this differs from elliotsawyer/silverstripe-typesense
| elliotsawyer/silverstripe-typesense | This module | |
|---|---|---|
| What gets indexed | Database fields you configure per collection | The rendered page as plain text (FullPage), plus Title and URL |
| Keeping the index up to date | Sync task / queued jobs | Automatic upsert on publish, delete on unpublish or when Show in search is off, plus its own sync task |
| Frontend | None | Instant-search overlay (InstantSearch.js), ?q= in the URL with back-button support, GA4 / Tag Manager / Matomo events |
| Local development | — | _local collection suffix so local and production indexes don't mix |
The admin for collections, fields and synonyms is still the one from Elliot Sawyer's module. This module turns his sync task off and replaces it with TypesenseSyncTaskHmk.
Requirements
- PHP 8.0+
- Silverstripe CMS 5
- A running Typesense server
- jQuery and the Bootstrap
d-noneutility class on the frontend (used by the overlay, see Frontend search)
Installation
Then run vendor/bin/sake dev/build flush=1.
Quick start
-
Add the environment variables to your
.env: -
Define a collection: copy
_config/typesense.yml.exampletoapp/_config/typesense.ymland give it a unique name. -
Build the index:
- Add the overlay to your template and load the script:
From then on, every publish updates the index.
Documentation
- How it works: how pages are rendered and turned into searchable text
- Configuration: environment variables, collections, DOM clean-up
- Frontend search: the overlay, JavaScript usage, analytics, known limitations
- Development: building the JavaScript bundle, releases
Changelog
See Releases for the changes in each version.
Credits and license
This module is released under the MIT license.
It depends on elliotsawyer/silverstripe-typesense by Elliot Sawyer, licensed under LGPL-3.0 with attribution. src/Tasks/TypesenseSyncTask.php is derived from that module's sync task and keeps its original copyright header.
All versions of silverstripe-typesense with dependencies
silverstripe/framework Version ^5.0
elliotsawyer/silverstripe-typesense Version ^0.0.7
ext-dom Version *
ext-libxml Version *
masterminds/html5 Version ^2.9