system.yaml 18 KB

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