system.yaml 18 KB

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