2017 © Pedro Peláez
 

project pinpie

PinPIE is a small and fast PHP site engine

image

pinpie/pinpie

PinPIE is a small and fast PHP site engine

  • Thursday, December 7, 2017
  • by igordata
  • Repository
  • 1 Watchers
  • 8 Stars
  • 85 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 15 Versions
  • 2 % Grown

The README.md

PinPIE Latest Stable Version Build Status codecov Code Climate Total Downloads License, (*1)

PinPIE - when PHP Is Enough

About

PinPIE is lightweight php-based engine for small sites, (*2)

Read more about PinPIE engine in PinPIE docs, (*3)

Overview

PinPIE is not a framework, nor it is a CMS. PinPIE is a site engine, designed to be quick and efficient even on cheap hostings., (*4)

PinPIE stores all contend in php-files. If opcode cacher is used — it will cache this files. That allows PinPIE to include pages, snippets and chunks in the blink of an eye., (*5)

Content stored in files allows you to edit your content using favorite IDE or text editor with all that highlighting, auto-formatting, auto-saving, auto-uploading features and familiar hotkeys. Also that allows to benefit from full debug support including exact line numbers and IDE code execution flow controls. This approach is friendly to version control systems — you can have versions of all your content to be safe and protected against loosing something while editing anything. Deployment friendly. Backup friendly., (*6)

PinPIE have tag-based parser. Tag syntax is inspired by ModX tag system. Basic tags are:, (*7)

  • Chunks — a pieces of plain text
  • Snippets — a pieces of php code to execute

Read more in tags readme., (*8)

PinPIE provide clear and controllable automatic snippet caching. Caching can be enabled or disabled for each snippet tag separately. Caching control is predictable and simple., (*9)

This is a snippet tag. Snippet is a piece of PHP code. This snippet is executed for every request. It is not cached., (*10)

[[$snippet]]

And here is the example of cached snippet syntax:, (*11)

[[60$snippet]]

Look at this one. It is cached for one minute. If snippet file or one of files of its children is changed, PinPIE will execute and recache this snippet automatically., (*12)

To cache snippet forever, just use that syntax:, (*13)

[[!$snippet]]

That snippet will be cached for about ten years, which is a lot., (*14)

You don't need to purge cache yourself every time you change something important on the site. PinPIE will automatically recache only changed content. But anyway, you can purge the cache if you want. Read more in cache readme., (*15)

Read more about PinPIE engine in PinPIE docs., (*16)

Examples

Look at this example of some possible page:, (*17)


[title[=Hello]]



Hi!, (*18)

The answer is [[$rand]]., (*19)

[[%img=/images/cat.jpg]]

Now visit another page., (*20)

[[lorem/ipsum]]

After page is processed, its HTML code will look like that:, (*21)

...

<article>
  <header>
    <h1>Hello</h1>
  </header>





Hi!, (*22)

The answer is 453., (*23)

<img src="//test.ru/images/cat-1.jpg?time=d9c8899d5833a0616ad2aef0bc2229cd" width="640" height="427">

Now visit another page., (*24)

< p>Lorem ipsum dolor sit amet...

Here the [title[=Hello]] is a constant with some text. In this example it goes into the placeholder [[*title]]. That placeholder is used in the <h1> tag, and in the same time let's assume it is used also in the <title> tag in the template. In that way, this text will appear on the page as a heading and in the head of the page in title., (*25)

The snippet [[$rand]] will run PHP code from file /snippets/rand and will output a random number., (*26)

The static tag [[%img=/images/someimage.jpg]] is very convenient way to use images, css and js files on the page. It will automatically output something like:, (*27)

<img src="//test.ru/images/someimage.jpg?time=4134cb552b4782d97e3450bfa42eb049" width="640" height="427">

You can see a time hash to make changed static files updated in browser.
Also PinPIE add the image width and height automatically. This behavior can be changed in config., (*28)

Chunk [[lorem/ipsum]] is just a piece of text in a /chunks/lorem/ipsum folder., (*29)

You can find more examples in other PinPIE repos or at PinPIE site., (*30)

Start using PinPIE

You can install PinPIE with composer:, (*31)

composer require "pinpie/pinpie"
composer install

Or download code from GitHub and use standalone autoloader file /pinpie/src/autoload.php., (*32)

You can find more detailed instructions in start unsing PinPIE docs., (*33)

Credits

Author and maintainer of PinPIE is Igor Data (@igordata), (*34)

The Versions

07/12 2017

dev-stable

dev-stable http://pinpie.rocks

PinPIE is a small and fast PHP site engine

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Igor Data

07/12 2017

1.1.2

1.1.2.0 http://pinpie.rocks

PinPIE is a small and fast PHP site engine

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Igor Data

07/12 2017

1.1.1

1.1.1.0 http://pinpie.ru

PinPIE is a small and fast PHP site engine

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Igor Data

07/12 2017

1.1.0

1.1.0.0 http://pinpie.ru

PinPIE is a small and fast PHP site engine

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Igor Data

28/03 2017

dev-dev

dev-dev http://pinpie.ru

PinPIE is a small and fast PHP site engine

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Igor Data

28/03 2017

1.0.1

1.0.1.0 http://pinpie.ru

PinPIE is a small and fast PHP site engine

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Igor Data

17/01 2017

1.0.0

1.0.0.0 http://pinpie.ru

PinPIE is a small and fast PHP site engine

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Igor Data

21/12 2016

0.9.16

0.9.16.0 http://pinpie.ru

PinPIE is a small and fast PHP site engine

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Igor Data

08/10 2016

0.9.15

0.9.15.0 http://pinpie.ru

PinPIE is a small and fast PHP site engine

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Igor Data

05/10 2016

0.9.14

0.9.14.0 http://pinpie.ru

PinPIE is a small and fast PHP site engine

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Igor Data

04/10 2016

0.9.13

0.9.13.0 http://pinpie.ru

PinPIE is a small and fast PHP site engine

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Igor Data

01/10 2016

0.9.12

0.9.12.0 http://pinpie.ru

PinPIE is a small and fast PHP site engine

  Sources   Download

MIT

The Requires

 

The Development Requires

by Igor Data

01/10 2016

0.9.11

0.9.11.0 http://pinpie.ru

PinPIE is a small and fast PHP site engine

  Sources   Download

MIT

The Requires

 

by Igor Data

17/09 2016

0.9.10

0.9.10.0 http://pinpie.ru

PinPIE is a small and fast PHP site engine

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Igor Data

17/09 2016

0.9.9

0.9.9.0 http://pinpie.ru

PinPIE is a small and fast PHP site engine

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Igor Data