Various Grav notes.


Now needs PHP 7.4.

sudo su -
apt-get update
apt -y install software-properties-common
add-apt-repository ppa:ondrej/php
apt-get update
apt -y install php7.4
apt-get install -y php7.4-{mbstring,curl,ctype,zip,fpm,dom,gd,xml}

Update /etc/caddy/Caddyfile to use the 7.4-fpm.

Updating Grav

cd /var/www/
bin/gpm self-upgrade
bin/gpm update
chown -R www-data:www-data .

Updating the Highlighter plugin

git clone
cd highlight.js
npm install

The full list of languages is available from therepository.

  • Common languages only: node tools/build.js :common
  • All languages: node tools/build.js -t node
  • Specific languages: node tools/build.js -n python ruby
  • Common + other: node tools/build.js -t webbrowser :common powershell
  • CDN: node tools/build.js -t cdn -

Install the new script:

sudo cp build/highlight.pack.js /var/www/

Clear the cache:

cd /var/www/
sudo bin/grav clearcache --all
sudo chown -R www-data:www-data /var/www/