2017-04-13 15:03:20 -06:00
absolute_urls : false # Absolute or relative URLs for `base_url`
timezone: '' # Valid values : http://php.net/manual/en/timezones.php
default_locale : # Default locale (defaults to system)
param_sep : ':' # Parameter separator, use ';' for Apache on windows
wrapped_site : false # For themes/plugins to know if Grav is wrapped by another platform
reverse_proxy_setup : false # Running in a reverse proxy scenario with different webserver ports than proxy
force_ssl: false # If enabled, Grav forces to be accessed via HTTPS (NOTE : Not an ideal solution)
2017-11-06 19:50:59 -07:00
force_lowercase_urls : true # If you want to support mixed cased URLs set this to false
2017-04-13 15:03:20 -06:00
custom_base_url : '' # Set the base_url manually, e.g. http://yoursite.com/yourpath
username_regex : '^[a-z0-9_-]{3,16}$' # Only lowercase chars, digits, dashes, underscores. 3 - 16 chars
pwd_regex : '(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}' # At least one number, one uppercase and lowercase letter, and be at least 8+ chars
2017-12-05 17:03:05 -07:00
intl_enabled : true # Special logic for PHP International Extension (mod_intl)
2020-05-14 14:32:07 -06:00
http_x_forwarded : # Configuration options for the various HTTP_X_FORWARD headers
protocol : true
host : false
port : true
ip : true
2015-07-13 21:02:24 -06:00
languages :
2017-04-13 15:03:20 -06:00
supported: [] # List of languages supported. eg : [ en, fr, de]
2019-04-09 17:27:35 -06:00
default_lang : # Default is the first supported language. Must be one of the supported languages
2017-04-13 15:03:20 -06:00
include_default_lang : true # Include the default lang prefix in all URLs
2019-11-13 11:17:14 +02:00
include_default_lang_file_extension: true # If true, include language code for the default language in file extension : default.en.md
2020-01-29 14:58:50 +02:00
translations : true # If false, translation keys are used instead of translated strings
2017-04-13 15:03:20 -06:00
translations_fallback : true # Fallback through supported translations if active lang doesn't exist
session_store_active : false # Store active language in session
http_accept_language : false # Attempt to set the language based on http_accept_language header in the browser
override_locale : false # Override the default or system locale with language specific one
2020-10-15 11:12:30 +03:00
content_fallback : {} # Custom language fallbacks. eg : {fr : [ 'fr' , 'en' ] }
2020-10-16 12:29:37 +03:00
pages_fallback_only: false # DEPRECATED : Use `content_fallback` instead
2023-06-08 14:50:52 -06:00
debug : false # Debug language detection
2015-07-13 21:02:24 -06:00
2014-08-02 12:11:33 -07:00
home :
2017-04-13 15:03:20 -06:00
alias : '/home' # Default path for home, ie /
hide_in_urls : false # Hide the home route in URLs
2014-08-02 12:11:33 -07:00
pages :
2020-01-21 10:02:29 +02:00
type: regular # EXPERIMENTAL: Page type : regular or flex
2022-10-05 06:38:32 -06:00
dirs : [ 'page://' ] # Advanced functionality, allows for multiple page paths
2018-03-09 12:45:27 -07:00
theme : quark # Default theme (defaults to "quark" theme)
2014-08-02 12:11:33 -07:00
order :
2017-04-13 15:03:20 -06:00
by : default # Order pages by "default", "alpha" or "date"
dir : asc # Default ordering direction, "asc" or "desc"
2014-08-02 12:11:33 -07:00
list :
2017-04-13 15:03:20 -06:00
count : 20 # Default item count per page
2014-08-02 12:11:33 -07:00
dateformat :
2017-04-13 15:03:20 -06:00
default: # The default date format Grav expects in the `date : ` field
short : 'jS M Y' # Short date format
long : 'F jS \a\t g:ia' # Long date format
publish_dates : true # automatically publish/unpublish based on dates
2014-08-02 12:11:33 -07:00
process :
2017-04-13 15:03:20 -06:00
markdown : true # Process Markdown
twig : false # Process Twig
twig_first : false # Process Twig before markdown when processing both on a page
never_cache_twig: false # Only cache content, never cache twig processed in content (incompatible with `twig_first : true `)
2014-08-02 12:11:33 -07:00
events :
2017-04-13 15:03:20 -06:00
page : true # Enable page level events
twig : true # Enable Twig level events
2015-01-21 21:58:51 -07:00
markdown :
2017-04-13 15:03:20 -06:00
extra : false # Enable support for Markdown Extra support (GFM by default)
auto_line_breaks : false # Enable automatic line breaks
auto_url_links : false # Enable automatic HTML links
escape_markup : false # Escape markup tags into entities
special_chars : # List of special characters to automatically convert to entities
2015-01-21 21:58:51 -07:00
'>' : 'gt'
'<' : 'lt'
2020-06-04 14:42:38 -06:00
valid_link_attributes : # Valid attributes to pass through via markdown links
- rel
- target
- id
- class
- classes
2019-03-25 17:29:35 -07:00
types : [ html,htm,xml,txt,json,rss,atom] # list of valid page types
2017-04-13 15:03:20 -06:00
append_url_extension : '' # Append page's extension in Page urls (e.g. '.html' results in /path/page.html)
expires : 604800 # Page expires time in seconds (604800 seconds = 7 days)
2017-07-26 12:33:35 -06:00
cache_control : # Can be blank for no setting, or a valid `cache-control` text value
2017-04-13 15:03:20 -06:00
last_modified : false # Set the last modified date header based on file modification timestamp
2020-12-22 18:43:13 +02:00
etag : true # Set the etag header tag
2017-04-13 15:03:20 -06:00
vary_accept_encoding: false # Add `Vary : Accept-Encoding` header
2021-03-11 16:19:57 +02:00
redirect_default_code: 302 # Default code to use for redirects : 301 |302|303
redirect_trailing_slash: 1 # Always redirect trailing slash with redirect code 0|1|301|302 (0: no redirect, 1 : use default code)
redirect_default_route : 0 # Always redirect to page's default route using code 0|1|301|302, also removes .htm and .html extensions
2017-04-13 15:03:20 -06:00
ignore_files : [ .DS_Store] # Files to ignore in Pages
ignore_folders : [ .git, .idea] # Folders to ignore in Pages
ignore_hidden : true # Ignore all Hidden files and folders
2018-10-23 06:23:10 -06:00
hide_empty_folders : false # If folder has no .md file, should it be hidden
2017-04-13 15:03:20 -06:00
url_taxonomy_filters : true # Enable auto-magic URL-based taxonomy filters for page collections
2016-04-14 15:33:45 -06:00
frontmatter :
2017-04-13 15:03:20 -06:00
process_twig : false # Should the frontmatter be processed to replace Twig variables?
ignore_fields : [ 'form' , 'forms' ] # Fields that might contain Twig variables and should not be processed
2014-08-02 12:11:33 -07:00
cache :
2017-04-13 15:03:20 -06:00
enabled : true # Set to true to enable caching
2014-08-02 12:11:33 -07:00
check :
2017-04-13 15:03:20 -06:00
method: file # Method to check for updates in pages : file|folder|hash|none
2025-09-22 11:24:50 -06:00
interval : 0 # Seconds to reuse previous filesystem hash before rechecking (0 = every request)
2022-02-12 15:33:38 +02:00
driver: auto # One of : auto|file|apcu|memcached|redis
2017-04-13 15:03:20 -06:00
prefix : 'g' # Cache prefix string (prevents cache conflicts)
2019-02-18 12:59:47 -07:00
purge_at : '0 4 * * *' # How often to purge old file cache (using new scheduler)
clear_at : '0 3 * * *' # How often to clear cache (using new scheduler)
clear_job_type : 'standard' # Type to clear when processing the scheduled clear job `standard`|`all`
2021-10-26 11:39:15 -06:00
clear_images_by_default : false # By default grav does not include processed images in cache clear, this can be enabled
2022-02-12 15:33:38 +02:00
cli_compatibility : false # Ensures only non-volatile drivers are used (file, redis, memcached, etc.)
2017-04-13 15:03:20 -06:00
lifetime : 604800 # Lifetime of cached data in seconds (0 = infinite)
2025-08-25 13:27:23 +01:00
purge_max_age_days : 30 # Maximum age of cache items in days before they are purged
2017-04-13 15:03:20 -06:00
gzip : false # GZip compress the page output
allow_webserver_gzip: false # If true, `content-encoding : identity` but connection isn't closed before `onShutDown()` event
2016-09-21 18:45:13 +02:00
redis :
2017-04-13 15:03:20 -06:00
socket : false # Path to redis unix socket (e.g. /var/run/redis/redis.sock), false = use server and port to connect
2021-02-06 14:39:21 -07:00
password : # Optional password
database : # Optional database ID
2014-08-02 12:11:33 -07:00
twig :
2017-04-13 15:03:20 -06:00
cache : true # Set to true to enable Twig caching
debug : true # Enable Twig debug
auto_reload : true # Refresh cache on changes
2020-11-23 19:09:55 +02:00
autoescape : true # Autoescape Twig vars (DEPRECATED, always enabled in strict mode)
2017-04-13 15:03:20 -06:00
undefined_functions : true # Allow undefined functions
undefined_filters : true # Allow undefined filters
2021-04-09 21:31:45 +03:00
safe_functions : [ ] # List of PHP functions which are allowed to be used as Twig functions
safe_filters : [ ] # List of PHP functions which are allowed to be used as Twig filters
2014-08-02 12:11:33 -07:00
2017-04-13 15:03:20 -06:00
assets : # Configuration for Assets Manager (JS, CSS)
css_pipeline : false # The CSS pipeline is the unification of multiple CSS resources into one file
css_pipeline_include_externals : true # Include external URLs in the pipeline by default
css_pipeline_before_excludes : true # Render the pipeline before any excluded files
css_minify : true # Minify the CSS during pipelining
css_minify_windows : false # Minify Override for Windows platforms. False by default due to ThreadStackSize
css_rewrite : true # Rewrite any CSS relative URLs during pipelining
js_pipeline : false # The JS pipeline is the unification of multiple JS resources into one file
js_pipeline_include_externals : true # Include external URLs in the pipeline by default
js_pipeline_before_excludes : true # Render the pipeline before any excluded files
2022-01-09 13:29:40 -07:00
js_module_pipeline : false # The JS Module pipeline is the unification of multiple JS Module resources into one file
js_module_pipeline_include_externals : true # Include external URLs in the pipeline by default
js_module_pipeline_before_excludes : true # Render the pipeline before any excluded files
2017-04-13 15:03:20 -06:00
js_minify : true # Minify the JS during pipelining
enable_asset_timestamp : false # Enable asset timestamps
2021-03-08 18:51:51 +01:00
enable_asset_sri : false # Enable asset SRI
2015-02-23 16:30:52 -07:00
collections :
2021-06-15 10:15:12 -06:00
jquery : system://assets/jquery/jquery-3.x.min.js
2014-08-15 22:05:22 -06:00
2014-10-30 16:19:05 -06:00
errors :
2017-04-13 15:03:20 -06:00
display : 0 # Display either (1) Full backtrace | (0) Simple Error | (-1) System Error
log : true # Log errors to /logs folder
2014-10-30 16:19:05 -06:00
2018-06-22 23:03:58 -07:00
log :
handler: file # Log handler. Currently supported : file | syslog
syslog :
facility : local6 # Syslog facilities output
2022-06-15 18:38:59 +02:00
tag: grav # Syslog tag. Default : "grav" .
2018-06-22 23:03:58 -07:00
2014-08-02 12:11:33 -07:00
debugger :
2017-04-13 15:03:20 -06:00
enabled : false # Enable Grav debugger and following settings
2019-06-14 13:43:24 -06:00
provider: clockwork # Debugger provider : debugbar | clockwork
2019-06-28 15:26:31 +03:00
censored : false # Censor potentially sensitive information (POST parameters, cookies, files, configuration and most array/object data in log messages)
2014-09-07 09:00:29 -06:00
shutdown :
2017-04-13 15:03:20 -06:00
close_connection : true # Close the connection before calling onShutdown(). false for debugging
2015-01-27 21:18:16 +01:00
images :
2025-08-16 12:52:55 +01:00
adapter: gd # Image adapter to use : gd | imagick
2017-04-13 15:03:20 -06:00
default_image_quality : 85 # Default image quality to use when resampling images (85%)
cache_all : false # Cache all image by default
cache_perms : '0755' # MUST BE IN QUOTES!! Default cache folder perms. Usually '0755' or '0775'
debug : false # Show an overlay over images indicating the pixel depth of the image when working with retina for example
2020-07-20 19:09:58 -06:00
auto_fix_orientation : true # Automatically fix the image orientation based on the Exif data
2019-03-14 17:14:19 -06:00
seofriendly : false # SEO-friendly processed image names
2021-04-05 19:21:03 +02:00
cls: # Cumulative Layout Shift : See https://web.dev/optimize-cls/
auto_sizes : false # Automatically add height/width to image
aspect_ratio : false # Reserve space with aspect ratio style
retina_scale : 1 # scale to adjust auto-sizes for better handling of HiDPI resolutions
2020-05-14 12:33:46 -06:00
defaults :
loading : auto # Let browser pick [auto|lazy|eager]
2024-02-03 21:24:12 +01:00
decoding : auto # Let browser pick [auto|sync|async]
2024-10-25 11:42:20 +02:00
fetchpriority : auto # Let browser pick [auto|high|low]
2021-10-21 13:31:33 +01:00
watermark :
image : 'system://images/watermark.png' # Path to a watermark image
position_y : 'center' # top|center|bottom
position_x : 'center' # left|center|right
scale : 33 # percentage of watermark scale
watermark_all : false # automatically watermark all images
2015-04-13 14:44:56 +02:00
2015-04-16 12:48:37 +02:00
media :
2017-05-12 23:28:40 +02:00
enable_media_timestamp : false # Enable media timestamps
2017-04-13 15:03:20 -06:00
unsupported_inline_types : [ ] # Array of supported media types to try to display inline
allowed_fallback_types : [ ] # Array of allowed media types of files found if accessed via Page route
2017-05-12 16:20:22 -06:00
auto_metadata_exif : false # Automatically create metadata files from Exif data where possible
2015-04-16 12:48:37 +02:00
2015-07-07 14:21:30 -06:00
session :
2017-04-13 15:03:20 -06:00
enabled : true # Enable Session support
2017-12-27 21:03:41 +02:00
initialize : true # Initialize session from Grav (if false, plugin needs to start the session)
2017-04-13 15:03:20 -06:00
timeout : 1800 # Timeout in seconds
name : grav-site # Name prefix of the session cookie. Use alphanumeric, dashes or underscores only. Do not use dots in the session name
2018-11-04 15:50:03 -07:00
uniqueness : path # Should sessions be `path` based or `security.salt` based
2017-04-13 15:03:20 -06:00
secure : false # Set session secure. If true, indicates that communication for this cookie must be over an encrypted transmission. Enable this only on sites that run exclusively on HTTPS
2021-12-08 17:38:16 +02:00
secure_https: true # Set session secure on HTTPS but not on HTTP. Has no effect if you have `session.secure : true `. Set to false if your site jumps between HTTP and HTTPS.
2017-04-13 15:03:20 -06:00
httponly : true # Set session HTTP only. If true, indicates that cookies should be used only over HTTP, and JavaScript modification is not allowed.
2020-12-09 15:42:46 +02:00
samesite : Lax # Set session SameSite. Possible values are Lax, Strict and None. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
2017-04-13 15:03:20 -06:00
split : true # Sessions should be independent between site and plugins (such as admin)
2021-02-10 18:46:43 +02:00
domain : # Domain used by sessions.
path : # Path used by sessions.
2016-04-12 15:49:09 -06:00
gpm :
2021-01-20 12:55:20 -07:00
releases : stable # Set to either 'stable' or 'testing'
2017-04-13 15:03:20 -06:00
official_gpm_only : true # By default GPM direct-install will only allow URLs via the official GPM proxy to ensure security
2018-04-20 14:03:49 +03:00
2025-10-15 10:29:26 -06:00
updates :
safe_upgrade : true # Enable guarded staging+rollback pipeline for Grav self-updates
2021-09-30 17:39:49 -06:00
http :
method : auto # Either 'curl', 'fopen' or 'auto'. 'auto' will try fopen first and if not available cURL
2021-10-01 11:42:41 -06:00
enable_proxy : true # Enable proxy server configuration
2021-09-30 17:39:49 -06:00
proxy_url : # Configure a manual proxy URL for GPM (eg 127.0.0.1:3128)
proxy_cert_path : # Local path to proxy certificate folder containing pem files
concurrent_connections : 5 # Concurrent HTTP connections when multiplexing
verify_peer : true # Enable/Disable SSL verification of peer certificates
verify_host : true # Enable/Disable SSL verification of host certificates
2019-02-07 14:36:07 -07:00
accounts :
2020-01-21 10:02:29 +02:00
type: regular # EXPERIMENTAL: Account type : regular or flex
2019-08-16 15:49:58 +03:00
storage: file # EXPERIMENTAL: Flex storage type : file or folder
2022-03-08 10:45:44 -07:00
avatar : gravatar # Avatar generator [multiavatar|gravatar]
2019-02-07 14:36:07 -07:00
2020-01-21 10:02:29 +02:00
flex :
cache :
index :
enabled : true # Set to true to enable Flex index caching. Is used to cache timestamps in files
lifetime : 60 # Lifetime of cached index in seconds (0 = infinite)
object :
enabled : true # Set to true to enable Flex object caching. Is used to cache object data
lifetime : 600 # Lifetime of cached objects in seconds (0 = infinite)
render :
enabled : true # Set to true to enable Flex render caching. Is used to cache rendered output
lifetime : 600 # Lifetime of cached HTML in seconds (0 = infinite)
2018-04-20 14:03:49 +03:00
strict_mode :
2020-11-23 19:09:55 +02:00
yaml_compat : false # Set to true to enable YAML backwards compatibility
2025-09-21 11:40:23 -06:00
twig2_compat: false # Set to true to enable deprecated Twig settings (autoescape : false )
2025-09-22 10:20:44 -06:00
twig3_compat : true # Set to true to enable automatic fixes for Twig 3 syntax changes
2020-11-23 19:09:55 +02:00
blueprint_compat : false # Set to true to enable backward compatible strict support for blueprints