Simlog is a simple blogging engine I built to power my website, diarmuid.ie. It is built using the Codeigniter framework and Bootstrap for admin screen styling.
- Markdown post editing.
- Static page caching.
- Media upload and management.
- Not much else!
Of course! However I wouldn't recommend it. I built SimLog to meet my own requirements and because of that there are lots of features that you might need missing. You would be better off using one of the many other PHP blog systems out there. The main reason for publishing my code is so that others might learn from it. Feel free to build upon this code or take bits of it to build your own blog software.
0.1
SimLog uses a number of open source projects to work properly:
- Codeigniter - A Simple PHP MVC framework.
- PHP Markdown - A PHP markdown to HTML processor.
- bootstrap - Frontend UI framework. Used for the admin screens.
- EpicEditor - An embeddable markdown editor and previewer.
- typeahead.js - Twitters autocomplete library. Used to autocomplete tags in the admin screens.
- jQuery - Needs no introduction.
- bootstrap-tagsinput - An addon to Bootstrap to allow tag input.
- retina.js - Small JS library to swap out regular images for retina ready ones if available.
- highlightjs - Syntax highlighting for blog posts with code samples.
All the project dependencies are handelled with Bower (Frontend dependency management) and Composer (PHP dependency management). Make sure you have both these tools installed before going any further.
First step is to clone this repo.
git clone [git-repo-url] Next we will load our dependencies.:
cd simlog
composer install
bower installcreate a new database in MySQL called simlog (or whatever you want really) and execute the contents of the schema.sql file.
in simlog/application/config create a folder called 'development' (or 'production if you are deploying to production). In this folder create a copy of:
- basic_auth.php - This file is used to store the authentication settings for the admin section of the site.
- config.php - The main codeigniter config file.
- database.php - Stores the database connection configuration.
Point the webroot of your webserver at simlog/www. If you are using Apache you can rename the example.htaccess to just .htaccess.
If you are using nginx then below is the server block I use to serve the site using FastCGI:
server {
...
root /var/www/simlog/www;
autoindex on;
index index.php;
location / {
try_files $uri $uri/ /index.php;
location = /index.php {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param CI_ENV production;
include fastcgi_params;
}
}
...
}
MIT