Skip to content

elinoretenorio/php-modern-static-website

Repository files navigation

PHP Modern Static Website

Setup your PHP-powered modern static website in minutes.

Features

  • Clean URLs
  • Separate templating
  • Easy to setup
  • Uses modern PHP libraries
  • 100% PHPUnit Code Coverage

Requires

Install

  • Go to application's root dir
  • Edit deploy.sh and update paths to your php, composer.phar and phpunit as needed
  • Run sh deploy.sh for dev and sh deploy.sh prod for prod
  • Update .env (as needed)
  • Manage the html templates in /views, including updating common layout in views/partials/layout.twig
  • To add a new page:
    • Go to /src/Home/HomeController.php and add desired route under PAGE_LIST
    • Then go to /views and add a template with the same name as the route (i.e if you want to add a page for /pricing, you will add pricing in /src/Home/HomeController.php > PAGE_LIST and create a new pricing.twig under /views)

Libraries