szyminson / simple-website

A simple micro-engine for simple websites.
MIT License
0 stars 0 forks source link

Simple Website

This project's goal is to create an easy in implementation and simple micro-enigne with blade theme support and text files based content management.

Table of Contents

Dependencies

Installation

  1. composer create-project szyminson/simple-website projectName,
  2. Rename .env.example to .env and change BASE_DIR variable to your projects path,
  3. Open your project in a browser and you should see an example page.

Advice

The best way to understand how to use Simple Website is to dig through the files while reading this README file.

Subpages

Subpage list is stored in /public/content/pages.config by default (you can change it's path in .env file). Remember to place subpages in the config file in order you want to see them in menu. First subpage from the file is automatically treated as a home page.

Layout

Simple Website uses BladeOne templating engine. There are 3 types of templates:

Main and sub layouts are stored in /views/layouts. Modules' layouts are stored in /views/modules.

File naming

Note

You can use Asset Packagist for your front-end dependencies. By default front-end assets will be stored in /public/assets.

Modules

Modules are simple parts which can be used to build your subpage. You can create 2 kinds of modules:

Static Modules

Just simple modules containting only html code. You can create them by creating a blade template in /views/modules.

File naming

/views/modules/ModuleName.blade.php

Dynamic Modules

In dynamic modules you can use your own php code. For this purpose you have to create a php file in /modules as well as a blade template in /views/modules. You can pass data from the backend part of your module to the template by setting a $Content array.

Variables available in module's backend