PMBlog is a small tool that turns Markdown files into static HTML. It can publish articles and pages, and it supports custom templates. PHP might not be the most comfortable language for this kind of job, but it is easy to set up and more than adequate for a small or medium-sized blog.
The project is now at version 4.0. It uses the Twig template engine with permission support, and the repository has moved to GitHub. You are welcome to keep using it.
Official site: http://lizheming.github.io/PMBlog Project repository: http://github.com/lizheming/PMBlog
Installation
- Set up a local PHP environment.
- Download the code and edit config.php.
- Visit index.php, and the static files will be generated in the html directory.
Markdown file rules
By default, the Markdown filename becomes the filename of the output static page — hello-world.md will produce hello-world.html. Using Chinese characters in filenames is not recommended.
Markdown files support several custom fields:
title: Hello Worldsets the title of the article (required).date: 2013年2月11日sets the publication date. If this field is omitted, the program uses the file's creation time as the publication time (optional).type: pagemarks the article as a page. It accepts onlypageorpost; the default ispost(optional).status: draftmarks the article as a draft; drafts are not output. It accepts onlydraft, and other values are invalid. By default, an article is published (optional).tags: tag1, tag2sets the keywords for the article, separated by half-width commas (optional).
So for now, the simplest possible file is just a title: field followed by the body text.