MdBlog Liaison App
Easily integrate markdown-based blog-articles into your website. Does not use a database.
Create a blog directory & structure it like so:
blogs/
test/ ## a category
header-with-php.md
category/
sub-category/
another-blog.md
blog-slug.md
hidden-post.draft.md # draft posts won't ever be shown.
With Liaison, simply do:
require(dirname(__DIR__,2).'/vendor/autoload.php');
//setup liaison
$lia = new \Lia();
$server = new \Lia\Package\Server($lia);
//enable the blog app
$mdblog = \Lia\App\MdBlog::enable($lia);
$mdblog->blog->dir = dirname(__DIR__).'/input/blogs/';
//deliver a request
$lia->deliver();
Otherwise, see app/addon/Main.php for more
Notes:
- All urls start with
/blog/
. This will be configurable in the future
Install
composer require taeluf/liaison.md-blog v0.2.x-dev
or in your composer.json
{"require":{ "taeluf/liaison.md-blog": "v0.2.x-dev"}}