Skip to content

Commit

Permalink
fix: #46 - DEV-3132 | settings not displaying correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
michtio committed Jan 24, 2025
2 parents bd5d9bb + d09b4a4 commit 36c0716
Show file tree
Hide file tree
Showing 55 changed files with 1,367 additions and 3,335 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ bower_components
node_modules
yarn-error.log
npm-error.log
composer.lock
package-lock.json

# MISC FILES
.cache
Expand Down
19 changes: 14 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,38 @@
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).
## 5.6.0 - 2025-01-06
### Added
- Added support for synonyms
- Added support for Craft Commerce (Products and Variants) thanks to [samuelbirch](https://github.com/samuelbirch) and [dezeweetjeniet](https://github.com/dezeweetjeniet) [PR #36](https://github.com/craftpulse/craft-typesense/pull/36)
- Added support for Shopify products thanks to [sidoneill](https://github.com/sidoneill) [issue #43](https://github.com/craftpulse/craft-typesense/issues/43)

## 5.5.4 - 2024-10-16
### Added
- Added event hooks to capture changes on the Typesense document (EVENT_AFTER_DELETE/EVENT_AFTER_UPSERT/EVENT_BEFORE_DELETE/EVENT_BEFORE_UPSERT)

### 5.5.3.1 - 2024-08-26
## 5.5.3.1 - 2024-08-26
### Fixed
- Composer version of craft vite

### 5.5.3 - 2024-08-26
## 5.5.3 - 2024-08-26
### Added
- Added the possibility to allow indexing multiple sections in a single collection [#35](https://github.com/craftpulse/craft-typesense/issues/35)
- Added code analysis and auto release scripts

### Fixed
- Removed composer.lock so latest versions of dependencies can be installed as defined in composer.json

### 5.5.2 - 2024-08-02
## 5.5.2 - 2024-08-02
### Fixed
- Added section.all fallback for the deletion of documents

### 5.5.1 - 2024-07-15
## 5.5.1 - 2024-07-15

### Fixed
- Check for the deletion on the documents

### 5.5.0 - 2024-04-09
## 5.5.0 - 2024-04-09

### Changed
- Craft 5 release
Expand Down
72 changes: 3 additions & 69 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,74 +24,8 @@ To install the plugin, follow these instructions.

3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Typesense.

## Typesense Overview
## Typesense Documentation

After setting up the config file on which indexes you want to create, you start right away after add / edit / delete elements. If you want to sync all of them, you can go to the Collections within the Typesense section in the control panel and sync all of them.
In our [Github Wiki](https://github.com/craftpulse/craft-typesense/wiki) where you can find the information and documentation about the plugin.

## Configuring Typesense

After copy and paste the config.php into your own config folder and name it typesense.php. Add your index, the fields you want to attach and the query accordingly to start from. Example below on a blog section

```php
'collections' => [
// CONTENT
\percipiolondon\typesense\TypesenseCollectionIndex::create(
[
'name' => 'blog',
'section' => 'blog.blog', //section handle + entry type handle
'fields' => [
[
'name' => 'title',
'type' => 'string',
'sort' => true,
],
[
'name' => 'slug',
'type' => 'string',
'facet' => true
],
[
'name' => 'handle',
'type' => 'string',
],
[
'name' => 'post_date_timestamp',
'type' => 'int32',
],
],
'default_sorting_field' => 'post_date_timestamp', // can only be an integer,
'resolver' => static function(\craft\elements\Entry $entry) {
return [
'id' => (string)$entry->id,
'title' => $entry->title,
'handle' => $entry->section->handle,
'slug' => $entry->slug,
'post_date_timestamp' => (int)$entry->postDate->format('U')
];
}
]
)
->elementType(\craft\elements\Entry::class)
->criteria(function(\craft\elements\db\EntryQuery $query) {
return $query->section('blog');
}),
]
```

By default, Craft CMS doesn't fire an event after updating a status when a scheduled post goes out. Therefore we provide a console command that you can attach to your cron jobs. The command checks if there are entries that are scheduled to go out today and if they haven't been updated after that date

```
./craft typesense/default/update-scheduled-posts
```

## Using Typesense

-Insert text here-

## Typesense Roadmap

Some things to do, and ideas for potential features:

- Release it

Brought to you by [craftpulse](https://github.com/craftpulse)
Brought to you by [craftpulse](https://craft-pulse.com/)
Loading

0 comments on commit 36c0716

Please sign in to comment.