Un sitio web auto-alojada en nginx y grav

From Wiki-Fou

relationada con el project Una pagina web auto alojada de bajo consumo

Nginx

Ver https://grav.stallaf.net/web-nginx/ (y https://learn.getgrav.org/17/webservers-hosting/servers/nginx#example-nginx-conf)

Grav

Install grav+admin https://learn.getgrav.org/17/basics/installation

Install Typhoon theme https://getgrav.org/premium/typhoon/docs#create-a-custom-theme-from-typhoon

hacer un copy para modificar

 ./fixperm.sh 
 bin/gpm install license-manager
 bin/gpm selfupgrade -f
 bin/gpm install typhoon
 bin/gpm install devtools
 bin/plugin devtools new-theme


 sudo -u www-data bin/gpm install admin-media-move


Script a exec a donde ha y el grav

 #!/bin/sh
 chown -R www-data:www-data .
 find . -type f -exec chmod 664 {} \;
 find ./bin -type f -exec chmod 775 {} \;
 find . -type d -exec chmod 775 {} \;
 find . -type d -exec chmod +s {} \;

Anadir el crontjob con el usario www-data

 sudo crontab -u www-data -e

y poner

 * * * * * cd /var/www/hlt;/usr/bin/php bin/grav scheduler 1>> /dev/null 2>&1

Tips & Tricks

Por la parte Actualitat con Mastodon feeds, hay que copiar desde dev3 :

 user/themes/calafou-new/templates/actualitat.html.twig 
 user/themes/calafou-new/templates/partials/mastodon-*