Skip to content

aboutdavid/1fileblog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

1fileblog

GitHub

❓ What is 1fileblog?

1fileblog is a simple PHP blog which only uses 1 file*

⚙️ How does it work?

Everything is written in PHP and should work in most PHP oriented servers such as apache2, nginx, or even the built in php server (not reccomended for production use). Posts are authored in markdown files, no web ui or anything, just a simple blog for simple people.

To create a post, make a new file in the posts directory. The filename before the . will be the slug.

The post structure would be the title on the first line, and the rest of the post on the other lines.

# Title
content
content
**content** (if markdown enabled)

💪 How does it compare with wordpress?

WordPress is a blogging platform, and a forum, and a shop, and a auction site, and anything you want. Good in theory, bad when tested. You just want a blog, not everything at once. It can be overwhelming. And, every 3 seconds, a wordpress instance is hacked. That's over 30000 instances per day (souce: Forbes). Plus, 1fileblog is a flat file CMS, which means it can render pages faster. Many people expect wordpress pages to load from 1 second to 5 seconds. Try 200ms with 1fileblog. 1fileblog is only one file where you can't change anything without having access to the server (unlike WordPress). 1fileblog has an easy setup process (just change a few settings in blog.php). 1fileblog also has dead simple caching so pages don't get rendered every single time you load

example of how fast 1fileblog is

🚀 How do I get started

Run these commands to get started:

mkdir posts
mkdir cache
wget https://github.com/aboutDavid/1fileblog/raw/main/blog.php
# If you want to enable rewrites (default enabled)
wget https://raw.githubusercontent.com/aboutDavid/1fileblog/main/.htaccess
# If you want to enable markdown (default enabled)
wget https://github.com/chadbraunduin/markdown.bash/raw/master/markdown.sh

*unless you want to use markdown, external stylesheet or use url rewrites, then you will need download a few files, but it can function with only 1!

About

A simple blog written in PHP, but in one file

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages