taeluf / liaison.md-blog
v0.1.x-dev
2021-11-10 13:36 UTC
Requires
- spatie/commonmark-highlighter: dev-main
- taeluf/liaison: v0.3.x-dev
- taeluf/liaison.common-mark: v0.2.x-dev
- taeluf/liaison.seo-extractor: v0.1.x-dev
Requires (Dev)
- taeluf/code-scrawl: v0.5.x-dev
- taeluf/tester: v0.2.x-dev
This package is auto-updated.
Last update: 2024-10-27 21:27:53 UTC
README
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:
$liaison = new \Liaison();
new \Lia\Addon\CommonMark($liaison);
$liaison->set('lia:blog.use_cache', false); //change to true to use caching
$blog_addon = new \Lia\Addon\Blog($liaison, $this->cli->pwd.'/test/blogs');
$response = $liaison->getResponse('/blog/test/header-with-php/', 'GET');
echo $response->content;
Otherwise, see app/class/Blog.php for more
Notes:
- All urls start with
/blog/
. This will be configurable in the future
Install
composer require taeluf/liaison.md-blog v0.1.x-dev
or in your composer.json
{"require":{ "taeluf/liaison.md-blog": "v0.1.x-dev"}}