blogfile

A Simple Blogging Platform: BlogFile

by author page

0 comments Articles

Samuel Levy has built a simple PHP blogging platform called BlogFile, it is one PHP file about 3000 lines and it includes all CSS and Javascript, the templating engine and the the MySQL install. His goal is a simple blogging platform with no images and no fancy plugins and extra users, you are able to add your own styling and template by modifying the top portion of the single php file. I can’t wait to ry it out and maybe even build a Ruby version, on the GitHub README.md he states that:

Don’t you know that PHP is horrible? Why no Python / Ruby / Lisp / Cobol / Fortran / Go / C?

Because I find PHP fun. It has it’s limitations, sure, but I enjoy it. If you want to re-create this project in some other language, then go ahead. I’m not stopping you.

[button style=”1″]Demo / Sam’s Blog[/button]

This is what Samuel Levy has to say about BlogFile and why he built it on his blog.

“Isn’t WordPress just too much? Drupal is worse, and Joomla! is about on par. All I want is a simple place to put my thoughts.

I don’t want plugins, or other users. I just want to write what’s in my mind, add some simplemarkup/markdown, and move on to the next thing that I’m doing.

So I built BlogFile.

It’s a single PHP file which powers a blog. This blog in particular, and your blog, if you’d like. It’s single-user; has a simple design (I’m no designer); supports comments, blog posts, and pages; allows you to style your posts with a simple markup; and doesn’t take up much space. The default install is only about 3000 lines of PHP including comments, whitespace, all the HTML templates, and the MySQL schema to install it. the best bit is that all of this is in a single file.

You can even install several copies of BlogFile right next to each other, in the same folder, on the same database, and they’re all kept separate and self contained.

So what about licencing? I released it on the WTFPL so pretty much… do what the fuck you want.

Requirements
This is what blogfile needs:

  • MySQL
  • PHP 5+ (with mysqli extension)
  • A web server like Apache
  • Write permissions (only during the install, and you can get by without them)

That’s pretty much it.

Skinning
I built a basic template engine, and all the templates are in the top half of the file. Go hog wild! Just keep in mind that the code expects there to be particular open slots in some templates, and that forms return specific fields. Other than that, you’re free to skin it.

Contributing
The project is on github, so if you have a bug fix, feel free to send em a pull request. If you want to add a new feature to the core system, you best be really convincing that it’s worth it, because “simple” is pretty much the main design goal here. Or you could fork your own project and add all the junk you want to it.”

Final Thoughts

Simple blogging platforms are popping up all over the place, but it is always great when you can host it yourself and customize it, then when you add a feature for yourself send a pull request to the author. As he mentioned above, you are welcome to contribute just keep it simple: That is what this blogging platform is all about