# `goBlog`

Just another blog middleware for ExpressJs.

Allows you to mount a blog anywhere in an existing Express app.
The posts are just `markdown` or `pug` files sitting in a directory
somewhere.

It will render a blog from static markdown file. If you do't provide
a template or themes for your blog. It will return a json object with 
`parsed object` from `markdown` file.

## Installing

```
npm install goblog
```

## Usage

```
import express from 'express';
const app = express();

import blog from 'express-blog-middleware';

app.use('/blog', blog({
    templateDir: 'template',
    templateDetail: 'detail-post',
    templateList: 'list-post',
    postDir: 'posts',
    postPerPage: 10
});
```

goBlog will provide two routes:

### List of posts

```
# A page of posts
GET /
```

If you have spesify `/blog/` for goblog, then you
can access it to get a list of posts.

### Detail post

```
# A detail post
GET /:postName
```

We use filename as slug to access it from url.
You can simply access it to `/blog/:postName`

### List of features

- [x] Parsing markdown files
- [x] Dynamic express view for multi template
- [x] Display all posts
- [x] Display detail post
- [x] Implement blog themes
- [ ] Sort blog by date
- [ ] Filter blog by category / tags
- [ ] Blog Pagination
- [ ] Set pretty slug like a wordpress /:category/:month/:day/:year/:name
- [ ] Create a demo
- [ ] Helper for markdown validation