Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.
/ french-press Public archive

An Express middleware module for hosting a simple Markdown file based blog

License

Notifications You must be signed in to change notification settings

coryflucas/french-press

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

French Press

What Is It?

Inspired by Jekyll and Typeset, French Press is a simple Markdown based middleware module for Express. The source is licensed under the MIT license and available on the GitHub Page.

Getting Started

Install the module

French Press works with the Express framework. To start using it with your existing Express application install the module via npm:

$ npm install french-press

Configure middleware

Now create a folder in your project for holding your posts, and configure and attache the middleware module to your Express application:

var express = require('express');
var fp = require('french-press');
...
var app = express();
...
app.use('/blog/', fp.blog(
  {
    postsDir: __dirname + '/posts',
    listTemplate: 'blogListTemplate',
    postTemplate: 'blogPostTemplate'
  }));

Create your templates

French Press requires two templates to be created, one for the listing of posts, and one for the display of a single post. The templates can be written in any of the template engines you have setup Express to work with. See the wiki for more information on configuring your templates.

Start writing posts

All you need to do now is create some posts. Posts are written in Markdown with font-matter headers (title and date are required). Here's a basic example:

---
title: Hello World
date: 2013-09-01 13:00:00
---
# First Post!

New posts and changes to existing posts are automatically detected, and will immediately be available. Perma-links default to the posts title, but can be overridden when configuring the middleware.

Additional Info

Check out the GitHub Page for the source and more information.

About

An Express middleware module for hosting a simple Markdown file based blog

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published