2017 © Pedro Peláez
 

library plaster

A flat-file non-CMS. Plaster puts a pretty coat on flat files, without disrupting the fundamental file/folder concept of a website.

image

jobyone/plaster

A flat-file non-CMS. Plaster puts a pretty coat on flat files, without disrupting the fundamental file/folder concept of a website.

  • Friday, February 19, 2016
  • by jobyone
  • Repository
  • 1 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 3 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Plaster CMS

CURRENTLY UNSTABLE This project is under active, pre-release development. It would be ill-advised to use it for any kind of production work. The APIs and interfaces are subject to change., (*1)

A flat-file non-CMS. Plaster puts a pretty coat on flat files, without disrupting the fundamental file/folder paradigm of a web server. The primary purpose of this application is to give select CMS-like features to a website that is primarily static and composed of flat files., (*2)

Features include:, (*3)

  • Markdown parsing
  • Twig parsing
  • Templates
  • Easy control over HTTP headers (particularly caching controls)
  • Output caching
  • Helpers for generating file lists and navigation elements
  • URL rewriting (i.e. serving .md files as if they had a .html extension)

Install with Composer

composer require jobyone/plaster

Basic use

//initialize a PlasterApplication, passing it a
//list of config files to use
$config = array('path-to-your-config.yaml');
$app = new jobyone\Plaster\PlasterApplication($config);

//render using default settings to use $_SERVER['PATH_INFO']
//as the url
$app->render();

//render() can also take a URL explicitly as
//its first argument, if you want to get it in
//some other way

Advanced use

For more advanced users, Plaster provides tools for doing many more interesting things. The basic paradigm consists of Response objects, which are designed to contain all information necessary to render a file. Each Response begins its life as simply an empty object with a URL attached to it. These Response objects are then run through a series of TransformationLayer objects. Each alters and builds upon the Response until a fully-formed Response pops out the other side, ready to render as a complete page., (*4)

Response objects can also be serialized using PHP's built in serialize(), and any set of TransformationLayer objects can be wrapped in a TransformationCache object that will serialize and cache the results by requested URL., (*5)

The Versions

19/02 2016

dev-master

9999999-dev

A flat-file non-CMS. Plaster puts a pretty coat on flat files, without disrupting the fundamental file/folder concept of a website.

  Sources   Download

GPL-3.0

The Requires