stevenschobert.com

My flat-file blog, written in PHP and Markdown.

Adding Posts

Create a .md file with the following bit JSON at the top, and save it in the posts directory:

{
  "title": "Post Title",
  "date": "Aug 20, 2012",
  "tags": ["github"]
}
--

Simple and fast. One of the main perks of having a flat-file blog.

Configuration

Near the top of the index.php file, there’s some global settings that can be adjusted:

$blog = new Slim(array(
  'view'        => new TwigView(),
  'posts.path'  => './posts',
  'md'          => new dflydev\markdown\MarkdownParser(),
  'pagination'  => 5
));

Note: the view and md are required and not customizable.

Theming

All the templates are built with Twig and are in the templates directory.

Changing out styles is as easy as changing the <link> tag in the main.html template:

<link rel="stylesheet" href="/css/main.css" />

More documentation on Twig is available here.

Advanced Customization

The whole blog engine is built on top of the Slim Framework. Stable documentation is available here.