- Layout - Configurable here
- Less - Configurable here
- Custom directory names - Configurable here
- Very basic routing - Configurable here
cd /var/www/
git clone https://github.com/Netfloex/Simple-PHP-Site.git *dirname*
If you use apache
nano /etc/apache2/sites-enabled/simple.conf
<VirtualHost *:80>
ServerName *host*
DocumentRoot "/var/www/*dirname*/public"
</VirtualHost>
# To allow rewriting to the router
<Directory /var/www/*dirname*/public>
AllowOverride All
allow from all
Options +Indexes
</Directory>
- To change the layout of your site (basic html structure for every page) you can edit the file contents in views/layout.php.
- The landing page is easily editable in views/index.php, this page will inherit from the layout.
- To style your page, dont edit public/css/app.css, this file is automatically generated. Instead you can edit less/index.less.
- To use multiple stylesheets you can import them in your less/index.less by using
@import 'file'
. - To add or change existing routes you can edit the JSON config in config/pages.json.
// config/pages.json
{
"/": { // Landing page
"title": "Main", // The title of the page
"doc": "index" // views/index.php
},
"mypage": { // Add your own!
"title": "Jo gamer" // If you dont specify the document property it automatically looks for "views/mypage.php"
},
"notFound": { // This page is used for a 404 error
"title": "404, not found",
"doc": "404"
}
}