system.yaml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. absolute_urls: false # Absolute or relative URLs for `base_url`
  2. timezone: '' # Valid values: http://php.net/manual/en/timezones.php
  3. default_locale: # Default locale (defaults to system)
  4. param_sep: ':' # Parameter separator, use ';' for Apache on windows
  5. wrapped_site: false # For themes/plugins to know if Grav is wrapped by another platform
  6. reverse_proxy_setup: false # Running in a reverse proxy scenario with different webserver ports than proxy
  7. force_ssl: false # If enabled, Grav forces to be accessed via HTTPS (NOTE: Not an ideal solution)
  8. force_lowercase_urls: true # If you want to support mixed cased URLs set this to false
  9. custom_base_url: '' # Set the base_url manually, e.g. http://yoursite.com/yourpath
  10. username_regex: '^[a-z0-9_-]{3,16}$' # Only lowercase chars, digits, dashes, underscores. 3 - 16 chars
  11. pwd_regex: '(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}' # At least one number, one uppercase and lowercase letter, and be at least 8+ chars
  12. intl_enabled: true # Special logic for PHP International Extension (mod_intl)
  13. http_x_forwarded: # Configuration options for the various HTTP_X_FORWARD headers
  14. protocol: true
  15. host: false
  16. port: true
  17. ip: true
  18. languages:
  19. supported: [] # List of languages supported. eg: [en, fr, de]
  20. default_lang: # Default is the first supported language. Must be one of the supported languages
  21. include_default_lang: true # Include the default lang prefix in all URLs
  22. include_default_lang_file_extension: true # If true, include language code for the default language in file extension: default.en.md
  23. translations: true # If false, translation keys are used instead of translated strings
  24. translations_fallback: true # Fallback through supported translations if active lang doesn't exist
  25. session_store_active: false # Store active language in session
  26. http_accept_language: false # Attempt to set the language based on http_accept_language header in the browser
  27. override_locale: false # Override the default or system locale with language specific one
  28. content_fallback: {} # Custom language fallbacks. eg: {fr: ['fr', 'en']}
  29. pages_fallback_only: false # DEPRECATED: Use `content_fallback` instead
  30. home:
  31. alias: '/home' # Default path for home, ie /
  32. hide_in_urls: false # Hide the home route in URLs
  33. pages:
  34. type: regular # EXPERIMENTAL: Page type: regular or flex
  35. theme: quark # Default theme (defaults to "quark" theme)
  36. order:
  37. by: default # Order pages by "default", "alpha" or "date"
  38. dir: asc # Default ordering direction, "asc" or "desc"
  39. list:
  40. count: 20 # Default item count per page
  41. dateformat:
  42. default: # The default date format Grav expects in the `date: ` field
  43. short: 'jS M Y' # Short date format
  44. long: 'F jS \a\t g:ia' # Long date format
  45. publish_dates: true # automatically publish/unpublish based on dates
  46. process:
  47. markdown: true # Process Markdown
  48. twig: false # Process Twig
  49. twig_first: false # Process Twig before markdown when processing both on a page
  50. never_cache_twig: false # Only cache content, never cache twig processed in content (incompatible with `twig_first: true`)
  51. events:
  52. page: true # Enable page level events
  53. twig: true # Enable Twig level events
  54. markdown:
  55. extra: false # Enable support for Markdown Extra support (GFM by default)
  56. auto_line_breaks: false # Enable automatic line breaks
  57. auto_url_links: false # Enable automatic HTML links
  58. escape_markup: false # Escape markup tags into entities
  59. special_chars: # List of special characters to automatically convert to entities
  60. '>': 'gt'
  61. '<': 'lt'
  62. valid_link_attributes: # Valid attributes to pass through via markdown links
  63. - rel
  64. - target
  65. - id
  66. - class
  67. - classes
  68. types: [html,htm,xml,txt,json,rss,atom] # list of valid page types
  69. append_url_extension: '' # Append page's extension in Page urls (e.g. '.html' results in /path/page.html)
  70. expires: 604800 # Page expires time in seconds (604800 seconds = 7 days)
  71. cache_control: # Can be blank for no setting, or a valid `cache-control` text value
  72. last_modified: false # Set the last modified date header based on file modification timestamp
  73. etag: true # Set the etag header tag
  74. vary_accept_encoding: false # Add `Vary: Accept-Encoding` header
  75. redirect_default_code: 302 # Default code to use for redirects: 301|302|303
  76. redirect_trailing_slash: 1 # Always redirect trailing slash with redirect code 0|1|301|302 (0: no redirect, 1: use default code)
  77. redirect_default_route: 0 # Always redirect to page's default route using code 0|1|301|302, also removes .htm and .html extensions
  78. ignore_files: [.DS_Store] # Files to ignore in Pages
  79. ignore_folders: [.git, .idea] # Folders to ignore in Pages
  80. ignore_hidden: true # Ignore all Hidden files and folders
  81. hide_empty_folders: false # If folder has no .md file, should it be hidden
  82. url_taxonomy_filters: true # Enable auto-magic URL-based taxonomy filters for page collections
  83. frontmatter:
  84. process_twig: false # Should the frontmatter be processed to replace Twig variables?
  85. ignore_fields: ['form','forms'] # Fields that might contain Twig variables and should not be processed
  86. cache:
  87. enabled: true # Set to true to enable caching
  88. check:
  89. method: file # Method to check for updates in pages: file|folder|hash|none
  90. driver: auto # One of: auto|file|apcu|memcache|wincache
  91. prefix: 'g' # Cache prefix string (prevents cache conflicts)
  92. purge_at: '0 4 * * *' # How often to purge old file cache (using new scheduler)
  93. clear_at: '0 3 * * *' # How often to clear cache (using new scheduler)
  94. clear_job_type: 'standard' # Type to clear when processing the scheduled clear job `standard`|`all`
  95. clear_images_by_default: false # By default grav does not include processed images in cache clear, this can be enabled
  96. cli_compatibility: false # Ensures only non-volatile drivers are used (file, redis, memcache, etc.)
  97. lifetime: 604800 # Lifetime of cached data in seconds (0 = infinite)
  98. gzip: false # GZip compress the page output
  99. allow_webserver_gzip: false # If true, `content-encoding: identity` but connection isn't closed before `onShutDown()` event
  100. redis:
  101. socket: false # Path to redis unix socket (e.g. /var/run/redis/redis.sock), false = use server and port to connect
  102. password: # Optional password
  103. database: # Optional database ID
  104. twig:
  105. cache: true # Set to true to enable Twig caching
  106. debug: true # Enable Twig debug
  107. auto_reload: true # Refresh cache on changes
  108. autoescape: true # Autoescape Twig vars (DEPRECATED, always enabled in strict mode)
  109. undefined_functions: true # Allow undefined functions
  110. undefined_filters: true # Allow undefined filters
  111. safe_functions: [] # List of PHP functions which are allowed to be used as Twig functions
  112. safe_filters: [] # List of PHP functions which are allowed to be used as Twig filters
  113. umask_fix: false # By default Twig creates cached files as 755, fix switches this to 775
  114. assets: # Configuration for Assets Manager (JS, CSS)
  115. css_pipeline: false # The CSS pipeline is the unification of multiple CSS resources into one file
  116. css_pipeline_include_externals: true # Include external URLs in the pipeline by default
  117. css_pipeline_before_excludes: true # Render the pipeline before any excluded files
  118. css_minify: true # Minify the CSS during pipelining
  119. css_minify_windows: false # Minify Override for Windows platforms. False by default due to ThreadStackSize
  120. css_rewrite: true # Rewrite any CSS relative URLs during pipelining
  121. js_pipeline: false # The JS pipeline is the unification of multiple JS resources into one file
  122. js_pipeline_include_externals: true # Include external URLs in the pipeline by default
  123. js_pipeline_before_excludes: true # Render the pipeline before any excluded files
  124. js_module_pipeline: false # The JS Module pipeline is the unification of multiple JS Module resources into one file
  125. js_module_pipeline_include_externals: true # Include external URLs in the pipeline by default
  126. js_module_pipeline_before_excludes: true # Render the pipeline before any excluded files
  127. js_minify: true # Minify the JS during pipelining
  128. enable_asset_timestamp: false # Enable asset timestamps
  129. enable_asset_sri: false # Enable asset SRI
  130. collections:
  131. jquery: system://assets/jquery/jquery-3.x.min.js
  132. errors:
  133. display: 0 # Display either (1) Full backtrace | (0) Simple Error | (-1) System Error
  134. log: true # Log errors to /logs folder
  135. log:
  136. handler: file # Log handler. Currently supported: file | syslog
  137. syslog:
  138. facility: local6 # Syslog facilities output
  139. debugger:
  140. enabled: false # Enable Grav debugger and following settings
  141. provider: clockwork # Debugger provider: debugbar | clockwork
  142. censored: false # Censor potentially sensitive information (POST parameters, cookies, files, configuration and most array/object data in log messages)
  143. shutdown:
  144. close_connection: true # Close the connection before calling onShutdown(). false for debugging
  145. images:
  146. default_image_quality: 85 # Default image quality to use when resampling images (85%)
  147. cache_all: false # Cache all image by default
  148. cache_perms: '0755' # MUST BE IN QUOTES!! Default cache folder perms. Usually '0755' or '0775'
  149. debug: false # Show an overlay over images indicating the pixel depth of the image when working with retina for example
  150. auto_fix_orientation: true # Automatically fix the image orientation based on the Exif data
  151. seofriendly: false # SEO-friendly processed image names
  152. cls: # Cumulative Layout Shift: See https://web.dev/optimize-cls/
  153. auto_sizes: false # Automatically add height/width to image
  154. aspect_ratio: false # Reserve space with aspect ratio style
  155. retina_scale: 1 # scale to adjust auto-sizes for better handling of HiDPI resolutions
  156. defaults:
  157. loading: auto # Let browser pick [auto|lazy|eager]
  158. watermark:
  159. image: 'system://images/watermark.png' # Path to a watermark image
  160. position_y: 'center' # top|center|bottom
  161. position_x: 'center' # left|center|right
  162. scale: 33 # percentage of watermark scale
  163. watermark_all: false # automatically watermark all images
  164. media:
  165. enable_media_timestamp: false # Enable media timestamps
  166. unsupported_inline_types: [] # Array of supported media types to try to display inline
  167. allowed_fallback_types: [] # Array of allowed media types of files found if accessed via Page route
  168. auto_metadata_exif: false # Automatically create metadata files from Exif data where possible
  169. session:
  170. enabled: true # Enable Session support
  171. initialize: true # Initialize session from Grav (if false, plugin needs to start the session)
  172. timeout: 1800 # Timeout in seconds
  173. name: grav-site # Name prefix of the session cookie. Use alphanumeric, dashes or underscores only. Do not use dots in the session name
  174. uniqueness: path # Should sessions be `path` based or `security.salt` based
  175. 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
  176. 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.
  177. httponly: true # Set session HTTP only. If true, indicates that cookies should be used only over HTTP, and JavaScript modification is not allowed.
  178. 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
  179. split: true # Sessions should be independent between site and plugins (such as admin)
  180. domain: # Domain used by sessions.
  181. path: # Path used by sessions.
  182. gpm:
  183. releases: stable # Set to either 'stable' or 'testing'
  184. official_gpm_only: true # By default GPM direct-install will only allow URLs via the official GPM proxy to ensure security
  185. http:
  186. method: auto # Either 'curl', 'fopen' or 'auto'. 'auto' will try fopen first and if not available cURL
  187. enable_proxy: true # Enable proxy server configuration
  188. proxy_url: # Configure a manual proxy URL for GPM (eg 127.0.0.1:3128)
  189. proxy_cert_path: # Local path to proxy certificate folder containing pem files
  190. concurrent_connections: 5 # Concurrent HTTP connections when multiplexing
  191. verify_peer: true # Enable/Disable SSL verification of peer certificates
  192. verify_host: true # Enable/Disable SSL verification of host certificates
  193. accounts:
  194. type: regular # EXPERIMENTAL: Account type: regular or flex
  195. storage: file # EXPERIMENTAL: Flex storage type: file or folder
  196. avatar: gravatar # Avatar generator [multiavatar|gravatar]
  197. flex:
  198. cache:
  199. index:
  200. enabled: true # Set to true to enable Flex index caching. Is used to cache timestamps in files
  201. lifetime: 60 # Lifetime of cached index in seconds (0 = infinite)
  202. object:
  203. enabled: true # Set to true to enable Flex object caching. Is used to cache object data
  204. lifetime: 600 # Lifetime of cached objects in seconds (0 = infinite)
  205. render:
  206. enabled: true # Set to true to enable Flex render caching. Is used to cache rendered output
  207. lifetime: 600 # Lifetime of cached HTML in seconds (0 = infinite)
  208. strict_mode:
  209. yaml_compat: false # Set to true to enable YAML backwards compatibility
  210. twig_compat: false # Set to true to enable deprecated Twig settings (autoescape: false)
  211. blueprint_compat: false # Set to true to enable backward compatible strict support for blueprints