Automad is a flat-file content management system designed for performance and straightforward configuration. Configuration can be managed through several methods depending on the context and scope of the settings being configured.
Using the Dashboard
The dashboard provides access to essential configuration options for day-to-day site administration. These options are available under the System Settings section and include user management, two-factor authentication, caching settings, mail configuration, AI assistance settings, and development debugging options. This interface offers a user-friendly approach to configuring Automad.
For more advanced and detailed configuration, use the configuration file instead.
Configuration File
Custom settings are stored as JSON within the config/config.php file and override the default configuration. The initial config file includes essential settings such as caching, debugging, and file type whitelisting, but any available configuration option can be added to the JSON object.
Refer to the Config class file for a complete list of available configuration options.
<?php return <<< 'JSON'
{
"AM_ALLOWED_FILE_TYPES": "ico, jpg, jpeg, png, webp, mp4, webm",
"AM_CACHE_ENABLED": true,
"AM_CACHE_LIFETIME": 43200,
"AM_CACHE_MONITOR_DELAY": 120,
"AM_DEBUG_ENABLED": false,
"AM_OPEN_BASEDIR_ENABLED": true,
"AM_DISK_QUOTA": 2048,
"AM_FEED_ENABLED": true,
"AM_FEED_FIELDS": "+hero, +main",
"AM_MAIL_OBFUSCATION_ENABLED": true,
"AM_PACKAGE_FILTER_REGEX": ".",
"AM_PASSWORD_MIN_LENGTH": 8,
"AM_PASSWORD_REQUIRED_CHARS": "@#%^~+=*$&! A-Z a-z 0-9"
}
JSON;
The config.php file serves as the primary configuration location. Configuration changes made through the dashboard are also stored in this file.
Environment Configuration
A subset of configuration settings can be defined using an .env file located in the repository root or within the server environment, such as a PHP pool configuration. The .env.example file lists all options available for environment configuration.
Priority of Configurations
When configuration options are defined in multiple locations, they are applied according to a priority order. The .env file has the highest priority, followed by server environment variables, then config.php, and finally the default Automad configuration.
Core Configuration Topics
The following sections cover the primary configuration settings that affect site performance and user experience.