itsjavi/flatdown

Minimalistic Flat-file CMS with Markdown support, written in PHP.

0.6.0 2017-05-26 07:38 UTC

README

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

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:

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 live
  • public/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 as serve, 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

License

The MIT License (MIT). Please see License File for more information.