Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/helloandre/pressing
Static site generator PHP library
https://github.com/helloandre/pressing
Last synced: 26 days ago
JSON representation
Static site generator PHP library
- Host: GitHub
- URL: https://github.com/helloandre/pressing
- Owner: helloandre
- License: mit
- Created: 2016-04-18T05:03:56.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-04-18T05:20:51.000Z (over 8 years ago)
- Last Synced: 2024-11-27T19:44:54.073Z (about 1 month ago)
- Language: PHP
- Size: 6.84 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Pressing
A Static Site Generator library for PHP.
## Install
```
composer install helloandre/pressing
```## Usage
```
$config = [];
$pressing = new Pressing\Pressing;
$pressing->generate($config);
```## Config
#### Pressing Config
`output_dir` - _default: public/_ - where the generated output will go.
`input_dir` - _default: src/_ - where Pressing should look for files to move to `output_dir`
`template_engine` - _default: Twig_ - what engine to use to render templates
`template_dir` - _default: templates/_ - where templates are located
#### Frontmatter
Each file may contain a frontmatter config that is JSON inside a top and bottom "marker" of three dashes as the very first thing in the file.
A file will be run through the template engine **ONLY IF** a frontmatter is found.
```
---
{ ... }
---
...
```or empty
```
---
---
...
```Any data contained within the frontmatter will be passed to the template.
#### Special Frontmatter
`template` - _default: none_ - declares which template to use.
## Template Engines
currently available template engines:
- [Twig](twig.sensiolabs.org)