New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

goblog

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

goblog

Blog middleware for the Express framework

latest
Source
npmnpm
Version
0.0.2
Version published
Weekly downloads
2
-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

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

  • Parsing markdown files
  • Dynamic express view for multi template
  • Display all posts
  • Display detail post
  • 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

Keywords

express

FAQs

Package last updated on 05 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts