Configuration

Below is an example of Dexter's default settings. When installed, a new dexter.php file will be added to your system/user/config/ directory with basic configuration. Review the default config below to determine which customization you're going to make. You do not have to copy the entire array. Array keys not found in your dexter.php file will fall back to the default values.

A minimal configuration using Meilisearch locally with DDEV would look like this. Choose which provider to use, give it the credentials, maybe set an environment name, which is used as all the index name prefixes, and then choose what to index and which index name to insert into. By default all fields will be indexed unless you define any indexableFields.

<?php

return [
    'provider' => 'meilisearch',

    'meilisearch' => [
        'url' => 'https://meilisearch-index-url.com:7700',
        'appKey' => 'ddev',
    ],

    'env' => 'prod',

    'indices' => [
        'entries' => [
            'exhibit' => 'exhibits',
            'work' => 'collections',
            'exhibitions' => 'exhibitions',
            'newsArticle' => 'news_articles',
        ],
        'categories' => [
            'newsCategory' => 'news_categories',
        ],
        'files' => [
            'images' => 'images',
            'digitalOcean' => 'images',
        ],
        'users' => [
            'contentManagers' => 'users',
        ]
    ],
];

Using the system/user/config/dexter.php file is preferred as it helps keep things separate and tidy, but if you prefer to use the main system/user/config/config.php file you can still do that. You will just need to define the settings under the dexter scope. For example:

The full default config from system/user/addons/dexter/settings.php

Last updated

Was this helpful?