Grav – Configuration System

  • Post author:
  • Post category:Grav
  • Post comments:4 Comments

In this chapter, we will study about the Configuration System in Grav’s Administration Panel. You can directly configure the settings of your site’s system with the help of the Configuration page. Furthermore, you will see a brief explanation of your server’s properties including PHP, server environment, and other several components that regulate how your site performs.

The System tab allows you to modify the settings in the /user/config/system.yaml file. This affects many primary systems related features of Grav’s operation. The settings can be divided into different sections that show you different features of Grav’s performance.

Below is a detailed list of the configuration sections that are displayed in the systems tab −

Content

In this section, you can fix the basic properties of Content handling for your site as shown below.

  • Home Page − Specifies the home page that you want to display for your site.
  • Default Theme − Displays the primary default theme for your site.
  • Process − Controls how pages are processed. Can be set per-page rather than globally.
  • TimeZone − Sets the default timezone in the server.
  • Short Date Format − Displays the short date format.
  • Long Date Format − Displays the long date format.
  • Default Ordering − Pages are displayed in a list using this order.
  • Default Order Direction − Specifies the direction of pages in a list.
  • Default Page Count − Defines the maximum default page count in a list.
  • Date Based Publishing − It automatically publishes posts as per the date.
  • Events − It specifies to enable or disable the events. Disabling will cause damage to the plugin.
  • Redirect Default Route − It defines a default route and automatically redirects to a page.

Languages

You can set the Multi language features in this area as shown below.

 Configuration System
  • Supported − It specifies list of two letter language codes separated with comma, i.e., en, fr, de.
  • Translations Enabled − Enables the translations in Grav, plugins and extensions.
  • Translations Fallback − It specifies the substitute supported translations, if active language is not present.
  • Active Language in Section − You can store the active language in the area.
  • Home Redirect Include Language − It includes language in home redirect (/en) as per the demand.
  • Home redirect Include Route − It specifies redirecting admin home root.
  • Set language from browser − It specifies the language from browser.
  • Override locale − It specifies to override locale.

HTTP Headers

This section is used to set the HTTP Headers options. This setting helps in the browser based caching and optimization.

  • Expires − Defines the expiry time and sets the value in seconds.
  • Last Modified − Last modified header is set which helps to optimize proxy and browser caching.
  • ETag − Defines the e tag header to identify a modified page.
  • Vary Accept Encoding − You should arrange the Vary: HTTP header to Accept. This will benefit the cache on proxies.

Markdown

In this section, we will study about how Grav manages Markdown and its features to enable Markdown Extra. It helps the user and makes up the bulk of Grav’s page content.

  • Markdown Extra − It specifies a default support for Markdown Extra.
  • Auto Line Breaks − It specifies line breaks in markdown.
  • Auto URL Links − It specifies conversion of URLs into HTML hyperlinks.
  • Escape Markup − It specifies the markup tabs into HTML objects.

Caching

In this section, you can configure your site’s primary Caching functions. Grav has combined the caching feature that helps to build the fastest flat-file CMS options for the users.

  • Caching − This specifies to switch ON/OFF globally to enable/disable Grav caching.
  • Cache Check Method − This defines the cache check methods for File, Folder, and None.
  • Cache Driver − This specifies to choose cache driver to the users. Auto Detect cache driver finds to be best.
  • Cache Prefix − This specifies an identifier for part of the Grav key. Change it only if needed or else don’t change it.
  • Lifetime − This defines the cache lifetime in seconds, 0=infinite.
  • Gzip Compression − To increase the performance, enable Gzip compression of the Grav page.

Twig Templating

In this section, Grav highlights its Twig templating features. You can configure Twig caching, debug and modify tracking down setting here.

 Configuration System
  • Twig Caching − This specifies to control the Twig caching system. It gives the best performance, when it is enabled.
  • Twig Debug − This defines the option not to load the Twig Debugger extension.
  • Detect Changes − Any changes done in Twig templates, this will automatically recompile the Twig cache.
  • Autoescape Variables − All variables are autoescapes; this can cause damage to your site.

Assets

This section is used to handle the assets, including CSS and JavaScript assets as shown below.

 Configuration System
  • CSS Pipeline − Integration of multiple CSS resources into a single file.
  • CSS Minify − During the pipelining the CSS is minify.
  • CSS Minify Windows Override − It is set False by default and it defines Minify Override for Windows platforms.
  • CSS Rewrite − CSS relative URL’s are rewritten during pipelining.
  • JavaScript Pipeline − Integration of multiple JavaScript resources into a single file.
  • JavaScript Minify − During the pipelining the JS is minify.
  • Enable Timestamps on Assets − Timestamps on assets are enable.
  • Collections − Assets collection is added individually.

Error Handler

During the time of site development, this section is very useful to manage the Grav error reporting.

  • Display Error − Full backtrace-style error page is displayed.
  • Log Errors − Log errors are displayed into /logs folder.

Debugger

This is similar to error handling, the debugging tools are integrated in Grav to locate and troubleshoot errors.

 Configuration System
  • Debugger − Debugger and its settings are enabled.
  • Debug Twig − Twig templates debugger is enabled.
  • Shutdown Close Connection − Before calling onShutdown(), you need to close the connection.

Media

This section is used to manage the media content of Grav. You can configure the Image quality, file upload size and many media handling options here.

 Configuration System
  • Default Image Quality − Use the default image quality while caching or resampling the images.
  • Cache all Images − All the images are run through Grav’s cache system, even if it does not contain media manipulations.
  • Image Debug Watermark − You can indicate the pixel depth of the image, while showing an overlay over the images, i.e., working with retina.
  • File Upload Limit − It defines the maximum upload size in bytes (0 is infinite).
  • Enable Timestamps on Media − Add timestamp to each media item according to the last modified date.

Session

The features mentioned below help you enable session support

  • Enable − This specifies the session support within Grav.
  • Timeout − This specifies the session timeout in seconds.
  • Name − This specifies the name of the session cookie, developed and applied by an identifier.

Advanced

In this section, you will see the advanced system options.

 Configuration System
  • Absolute URLs − This specifies absolute or relative URLs for base_url.
  • Parameter Separate − You can change Apache on Windows with the help of parameter separator.

Next Topic:-Click Here

This Post Has 4 Comments

Leave a Reply