Skip to content

Commit

Permalink
Update config reference
Browse files Browse the repository at this point in the history
  • Loading branch information
AugustMiller committed Nov 18, 2024
1 parent 153e1ee commit 64e25fd
Showing 1 changed file with 26 additions and 22 deletions.
48 changes: 26 additions & 22 deletions docs/get-started/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,19 @@ return [
'*' => [
'pluginName' => 'Feed Me',
'cache' => 60,
'enabledTabs' => '*',
'clientOptions' => [],
'requestOptions' => [],
'compareContent' => true,
'skipUpdateFieldHandle' => 'skipFeedMeUpdate',
'backupLimit' => 100,
'dataDelimiter' => '-|-',
'csvColumnDelimiter' => '',
'csvColumnDelimiter' => ',',
'parseTwig' => false,
'compareContent' => true,
'sleepTime' => 0,
'logging' => true,
'runGcBeforeFeed' => false,
'queueTtr' => 300,
'queueTtr' => null,
'queueMaxRetry' => 5,
'assetDownloadCurl' => false,
'feedOptions' => [
Expand All @@ -34,25 +36,28 @@ return [

### Configuration options

- `pluginName` - Optionally change the name of the plugin.
- `cache` - For template calls, change the default cache time.
- `requestOptions` - Any additional options to be sent with requests when fetching your feed content [Guzzle Options](http://docs.guzzlephp.org/en/stable/request-options.html). See an example below.
- `skipUpdateFieldHandle` - A provided field handle attached to your elements (often a Lightswitch or similar). If this field has a value during processing, Feed Me will skip the element.
- `backupLimit` - Set a limit to the number of backups to keep.
- `dataDelimiter` - Feed Me will try and split content based on this delimiter. Useful for CSVs.
- `csvColumnDelimiter` - Optionally set the delimiter for columns in CSVs before fetching the content.
- `parseTwig` - Whether to parse field data and default values for Twig. Disabled by default.
- `compareContent` - Whether to check against existing element content before updating. This can have considerable performance improvements and prevent against needless updating.
- `sleepTime` - Add the number of seconds to sleep after each feed item has been processed.
- `logging` - Set the level of logging to do. Possible values are `true` (default) to log everything, `false` to disable logging or `error` to only record errors.
- `runGcBeforeFeed` - Whether to run the Garbage Collection service before running a feed.
- `queueTtr` - Set the 'time to reserve' time in seconds, to prevent the job being cancelled after 300 seconds (default).
- `queueMaxRetry` - Set the maximum amount of retries the queue job should have before failing.
- `assetDownloadCurl` - Use curl to download assets from a remote source. Can be used when issues arise using the default implementation.
- `feedOptions` - Provide an array of any of the above options or [Feed Settings](../feature-tour/feed-overview.md) to set specifically for certain feeds. Use the Feed ID as the key for the array.
- `pluginName` — Optionally change the name of the plugin.
- `cache` — For template calls, change the default cache time.
- `enabledTabs` — Hide tabs in the Feed Me navigation. Pass an array with one or more of: `feeds`, `logs`, and `settings`. _This does not affect permissions, only the tabs’ visibility!_
- `clientOptions` — An array of Guzzle [client options](https://docs.guzzlephp.org/en/stable/quickstart.html#creating-a-client) to be merged with Craft’s defaults.
- `requestOptions` — Any additional options to be sent with requests when fetching your feed content Guzzle [request options](https://docs.guzzlephp.org/en/stable/request-options.html). See an example below.
- `compareContent` — Whether to check against existing element content before updating. This can have considerable performance improvements and prevent against needless updating.
- `skipUpdateFieldHandle` — Feed Me checks the provided field handle on each element that _would_ be updated while processing a feed. If its value is exactly `'1'`, the element is skipped. _This behavior only supports legacy Lightswitch fields in Craft 3.x._ If you need to control which elements in a feed are updated, consider preventing it via the `craft\feedme\services\Process::EVENT_STEP_BEFORE_PARSE_CONTENT` event.
- `backupLimit` — Set a limit to the number of backups to keep.
- `dataDelimiter` — Feed Me will try and split field values based on this delimiter. Useful for [table](https://craftcms.com/docs/5.x/reference/field-types/table.html), [checkboxes](https://craftcms.com/docs/5.x/reference/field-types/checkboxes.html), and [multiselect](https://craftcms.com/docs/5.x/reference/field-types/multi-select.html) fields.
- `csvColumnDelimiter` — Optionally set the delimiter for columns in CSVs before fetching the content.
- `parseTwig` — Whether to parse field data and default values for Twig. Disabled by default.
- `sleepTime` — Add the number of seconds to sleep after each feed item has been processed.
- `logging` — Set the level of logging to do. Possible values are `true` (default) to log everything, `false` to disable logging or `error` to only record errors.
- `runGcBeforeFeed` — Whether to run the Garbage Collection service before running a feed.
- `queueTtr` — Set the 'time to reserve' time in seconds, to prevent the job being cancelled after 300 seconds (default).
- `queueMaxRetry` — Set the maximum amount of retries the queue job should have before failing.
- `assetDownloadCurl` — Use curl to download assets from a remote source. Can be used when issues arise using the default implementation.
- `feedOptions` — Provide an array of any of the above options (or [feed settings](../feature-tour/feed-overview.md)) to set or override for specific feeds, keyed by their existing feed IDs. _Note that feed IDs may be different across environments!_

#### Example `requestOptions`
See [Guzzle Options](http://docs.guzzlephp.org/en/stable/request-options.html) for the full range:

See [Guzzle Options](https://docs.guzzlephp.org/en/stable/request-options.html) for the full range:

```php
'requestOptions' => [
Expand All @@ -66,9 +71,8 @@ See [Guzzle Options](http://docs.guzzlephp.org/en/stable/request-options.html) f
'foo' => 'bar'
],
],

```

## Control Panel

You can also manage configuration settings through the Control Panel by visiting Settings → Feed Me.
You can also manage configuration settings through the control panel by visiting Settings → Feed Me.

0 comments on commit 64e25fd

Please sign in to comment.