grav gassg

Grav As Static Site Generator - Grav Plugin

11
1
PHP

Grav SSG plugin

This plugin is built to fit into Grav which is a flat-file CMS.

It allows to build a static version of all pages generated by the CMS, in order to serve this version without any server-side processing.

That version is thus quite protected from security hacks such as SQL or XSS injections.

Implementation

Typically, let’s say you are building your website under the domain name mysite.com .

  • You can create a subfolder /grav and install in there a Grav based website, theme it,… and protect it with a basic .htaccess to make sure you’re the only one accessing it.
  • Install the plugin, rename the plugin folder “generator”, set the options as destination_folder=…/ and destination_domain=http://mysite.com .
  • Generate the export from http://mysite.com/grav/admin/generator
  • Your website is publicly accessible from http://mysite.com