itsjavi / flatdown
Minimalistic Flat-file CMS with Markdown support, written in PHP.
Installs: 15
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:project
Requires
- php: ^5.6 || ^7.0
- cebe/markdown: ~1.1.1
- http-interop/http-middleware: ^0.4
- itsjavi/philae: ^0.5
- league/plates: ~3.3.0
- middlewares/error-handler: ~0.6.0
- middlewares/utils: ~0.11.1
- symfony/yaml: ~3.2.7
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.3
- phpunit/phpunit: ^5.7
- squizlabs/php_codesniffer: ^2.8
This package is not auto-updated.
Last update: 2020-01-24 16:39:55 UTC
README
Minimalistic Flat-file CMS with Markdown support, written in PHP.
This project is compliant with PSR-1, PSR-2, PSR-4, PSR-7, PSR-11 and PSR-15. If you notice compliance oversights, please send a patch via pull request.
Highlights:
- Ideal for local and content-rich microsites: documentation, personal notes, recipes, etc.
- No setups
- No admin, but config files
- No databases, but Markdown files
- No template engine, but plain PHP (with Plates)
- No complicated routing logic. Your content folder structure = your urls.
- No complicated or over-engineered code, easy to use as a base project
- Familiar project structure (inspired by Laravel)
- Familiar software components and patterns
- Under the hood:
- League Container as the center of the application (PSR-11 support)
- League Plates as plain PHP template engine
- Zend Diactoros as PSR-7 HTTP Messages implementation
- PSR-7 routing engine based on FastRoute
- Supports PSR-15 Middlewares including request-handler
- Markdown support for Extra and Github flavors, also YAML style metadata.
- Docker files for quick development environment
Install
Via Composer
$ composer create-project itsjavi/flatdown flatdown ~0.5
Via Command Line
$ git clone https://github.com/itsjavi/flatdown.git && cd flatdown && composer install
Serve and open in your browser
$ ./serve -o
Requirements
- PHP >= 5.6
- Composer
- Docker (optional)
Documentation
Sample Markdown file: public/content/demo.md
Directories
public/content
: Directory where your Markdown files will livepublic/assets
: Directory containing the different frontend assets (css, img, js, ...)resources/views
: Directory for the main layout and different views
Commands
./serve
: Serves the project using the builtin PHP HTTP server. Use the-o
option for opening it in the browser.docker-compose up
: The same asserve
, but it uses a containerized PHP in its latest version
Testing
$ composer test
or
$ vendor/bin/phpunit $ vendor/bin/phpcs
Contributing
Please see CONTRIBUTING for details.
Credits
- Carsten Brandt (Cebe Markdown)
- Oscar Otero (PSR-7 Middlewares)
- Nikita Popov (FastRoute)
- All Contributors
License
The MIT License (MIT). Please see License File for more information.