Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/folletto/meek
A very meek template engine in PHP.
https://github.com/folletto/meek
Last synced: 10 days ago
JSON representation
A very meek template engine in PHP.
- Host: GitHub
- URL: https://github.com/folletto/meek
- Owner: folletto
- Created: 2011-04-04T00:46:42.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2011-11-21T02:10:20.000Z (almost 13 years ago)
- Last Synced: 2024-10-10T00:21:16.132Z (about 1 month ago)
- Language: PHP
- Homepage: http://intenseminimalism.com
- Size: 145 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Meek 0.2
========**Humble template engine for small websites**
_Copyright (C) 2011, Davide Casali_
_Licensed under BSD Opensource License._WHAT IS MEEK
------------It's a humble & lightweight PHP engine to build small websites.
Meek maps directly URL to files and templates with a neat fallback system.HOW TO USE MEEK
------------1. Download or git clone [email protected]:folletto/Meek.git
2. Edit .htaccess
3. Write your templates inside templates/ folder.
4. Write your content in pages/ folder.
5. (optional) Write any constant variable in cfg.json.MEEK URL MAPPING
----------------If we imagine Meek installed at http://example.org/app/, in its simplest form the
URL mapping does this:* URL: http://example.org/app/path/to/file
* Loads: pages/path.to.file.php
* With the template from: templates/tpl.path.to.file.phpSimple right?
It does also a couple other tricks:
1. PAGES AUTO-FALLBACK
If pages/path.to.file.php is missing, it will try to load, in order:
pages/path.to.php
pages/path.php
pages/404.php
In this way you can build a kind of controller that reads the next URL token from
the pre-parsed array at: $this->virtual_uri and load the named item.2. TEMPLATES AUTO-FALLBACK
If templates/tpl.path.to.file.php is missing, it will try to load (like pages), in order:
templates/tpl.path.to.php
templates/tpl.path.php
templates/tpl.php
In this way you can control very well what's going to appear on each page.
You can even create a templates/tpl.api.php template that returns JSON or XML and build
a simple API.BUGS AND FEEDBACK
-----------------Submit your bugs here: http://github.com/Folletto/Meek/issues
Follow me on Twitter: http://twitter.com/FollettoCHANGELOG
---------* 0.2
* Markdown support for pages* 0.1
* First prototype