Skip to content

An utility to manage a small blog with files and markdown syntax

Notifications You must be signed in to change notification settings

mattmezza/blog-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Travis Scrutinizer Coverage Scrutinizer Packagist

blog-manager

A PHP utility class to manage a small blog with files and markdown syntax

composer require mattmezza/blog-manager

require_once 'vendor/autoload.php';

$config = array(
  "posts" => array(
    "dir" => __DIR__ . "/posts",
    "perpage" => 5
  ),
  "pages" => array(
    "dir" => __DIR__ . "/pages/"
  ),
  "url" => "http://localhost:8000"
);

$bm = new Blog\Manager($config);
$page = $bm->get_page("test");

// echo $page->title;
echo $page->body;
// echo $page->metas->wooow;

test.md

title: test
wooow: 'YAML syntax'
------------
# Test
Let's _try_
Matteo Merola mattmezza@gmail.com