Zepto
Zepto is a stupidly simple, blazing fast, flat-file CMS based on Pico., (*1)
Zepto is a flat-file CMS - this means there is no administration backend and database to deal with. You simply create .md
files in the "content" folder and that becomes a page., (*2)
Its interface is supposed to be simple and is in process of documentation. Thank you for choosing Zepto for your next project., (*3)
Features
- Uses Markdown for content
- Uses a powerful(ish) Slim/Silex-style router
- Standard and custom HTTP methods
- Route parameters with wildcards and conditions
- Dependency injection container using Pimple
- Template rendering using Twig
- HTTP caching
- Error handling and debugging
- Application hooks and extensible components for extending functionality
- Simple configuration
- Hilarious, snarky source code comments
Getting Started
System Requirements
You need PHP >= 5.3.0, and Composer is highly recommended., (*4)
Install
, (*5)
Composer install
composer install hassankhan/zepto
If that doesn't work, try setting minimum-stability
to dev
in your composer.json
file., (*6)
Then add the following to the top of your index.php
file:, (*7)
<?php
require 'vendor/autoload.php';
Manual install
Coming soon, (*8)
Project setup
After installing the package via Composer, pop open a terminal window, navigate to your project root and type in vendor/bin/zep init
to set up Zepto for its' first run., (*9)
First Run
Your project root should now look like this:, (*10)
.
โโโ .htaccess
โโโ composer.json
โโโ composer.lock
โโโ config.php
โโโ index.php
โโโ vendor/
Crack open index.php
in your text editor and you'll see, (*11)
require('vendor/autoload.php' );
require('config.php');
$zepto = new Zepto\Zepto($config); // Create instance of Zepto
$zepto->run(); // Run app
Setup your web server
Apache
Ensure the .htaccess
and index.php
files are in the same public-accessible directory. The .htaccess
file should at the very minimum contain this code:, (*12)
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
Others
Zepto hasn't been tested on other configurations yet, but because of how similar it is to Slim, the same instructions should work., (*13)
Documentation
You can check out more in-depth documentation here., (*14)
How to Contribute
Pull Requests
- Fork the Zepto repository
- Create a new branch for each feature or improvement
- Write tests so my precious code coverage doesn't decrease (too much)
- Send a pull request from each feature branch to the develop branch
It's pretty important to separate new features or improvements into separate feature branches, and to send a pull request for each branch. This allows me to review and pull in new features or improvements individually., (*15)
Style Guide
-
No extraneous whitespace. I hate it with a fucking vengeance
- Tabs should be set to four spaces
- Method names should be written in
snake_case()
, rather than camelCase()
- All source files should start with
<?php
but should not have an closing tag
- End files with a Unix-style newline
Coming soon, (*16)
Unit Testing
All pull requests should ideally be accompanied by passing unit tests and complete code coverage. Zepto uses PHPUnit for testing., (*17)
Don't make me laugh, (*18)
Forum and Knowledgebase
Coming soon, (*19)
Coming soon, (*20)
Author
Zepto is created and maintained by Hassan Khan., (*21)
Credits
Clearly a lot of help (especially) from Slim, as is apparent from the source code. This also would not have been possible without Pico, Symfony, or more specifically, the Symfony HttpFoundation component, PHP-Markdown and many others. The open-source PHP community in general does a fantastic job of polishing turds., (*22)
License
Zepto is released under the MIT public license., (*23)