Skip to content
This repository has been archived by the owner. It is now read-only.
Lightweight, static page generator
JavaScript CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.


Build Status

Flim is a lightweight static page generator for bloggers.


npm install flim


  • Do one thing and do it well.
  • Be fast
  • Be small and nimble
  • Delegate build tasks and to other modules / tools.
  • Be friendly to JavaScript data types
  • Highlight.js is better than Pygments
  • JSON not YAML

The examples directory should give you a feel for this.


Programmatic use

var flim = require('flim');
flim.init(function(err, data) {
  if (err) { throw err };

Command line use (assuming global install)

flim generate

Folder Structure

Flim expects sites to have a src folder containing _layouts and _posts folders.

├── _layouts
│   ├── index.jade
│   ├── layout.jade
│   ├── post.jade
│   └── tag.jade
└── _posts

Generated structure

Flim generates into a build folder. Flim is opinionated about the structure of the site that is generated

├── atom.xml
├── index.html
├── post-1
│   └── index.html
├── post-2
│   └── index.html
├── post-3
    └── index.html
├── sitemap.xml
└── tags
    ├── tag1
    │   └── index.html
    ├── tag2
    │   └── index.html


You can customise flim using a .flimrc file in the root of your flim site. This is JSON with the following options.

  "site_name": "A flim site",
  "src_dir": "./src",
  "build_dir": "./build",
  "tags": {
    "tags_dir": "tags",
    "template": "./src/_layouts/tag.jade"
  "pages": {
    "index": {
      "title": "Home",
      "meta": {
        "description": "My description",
        "keywords": "foo, bar, baz"
      "template": "./src/_layouts/index.jade"
    "posts": {
      "template": "./src/_layouts/post.jade"

Posts Structure

Posts are written using vanilla markdown and use JSON for metadata. GitHub markdown is supported.

  "layout": "post",
  "title": "Praesent urna lectus",
  "description": "Lorum dorum ipsum",
  "date": "Thu Jan 24 2013 16:32:12 GMT+0000 (GMT)",
  "tags": ["alpha", "beta", "gamma"]

# Praesent urna lectus

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla a sapien quam. Vestibulum rutrum mauris sed nisl condimentum sed tempus metus pulvinar. Donec porta suscipit arcu ut hendrerit. Proin lobortis sodales metus, id pretium dui ultrices ac. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. 


Flim delegates build tasks other than generating pages to other tools since you know best how you want to build and dpeloy your site. A Makefile or Grunt are recommended for copying files, minification and deployment. The examples folder contains sites with both of these tools. A more complex build process can be seen in the repository.

You can’t perform that action at this time.