A simple flat-file blogging platform that uses markdown and jade


Velcro is a simple, flat-file, blogging platform. It uses Markdown, Jade and Grunt.js.


npm install velcro



-h, --help output usage information

-g, --nogit Don't create a git repo.

-v, --vanilla Create a vanilla theme, without the use of grunt and sass.

-V, --version output the version number


velcro create [folder] Creates a new blog and initializes a git repo. If the destination folder does not exists it will be created. If no folder is passed, it will use the current directory (as long as it's empty).

velcro compile Compiles all posts (And if there's a gruntfile on your folder it will run it).

velcro watch Watches for changes in files (.md, .jade or .scss) and re-compiles all the files. For use when developing your theme.

velcro deploy Commits all new changes to the repo and then executes the file.

velcro daemon watch -> compile and deploy.


The most basic configuration of it's stored in velcro.json

"description":"A simple blogging platform built in node.js",
"author":"Bruno Lazzaro",
"index_post_count": 5,
"date_format":"mm/dd HH:mm"

The most important ones are the index post count and the date_format. For valid date formats check this page.


When you do velcro create the default theme is created. But if you want to start from scratch only these files are needed:

  • posts (The folder where you store all your .md files)
  • index.jade (The index template)
  • archive.jade (The Archive template)
  • post.jade (Individual post template)

If the --vanilla flag is ommited, you get a fully functional Gruntfile.js that does linting, sass compilation and css minification!

The theme that comes in bundled with velcro can be changed to what you want, as long as you follow the structure above you should be fine.


Velcro exposes certain base properties to jade along with all the post data and markdown metadata.

  • description (blog description, stored in velcro.json) - p= description
  • name (blog name, stored in velcro.json) - h1 #{name}

Post Data

  • (if none is defined in the markdown metadata, then it uses the one from the velcro.json file)
  • post.extract (The first paragraph of the post, if it's not defined then it will be generated for you)
  • (A string representing the time of last modification of the post, wich is usually when it was created)
  • post.url (only on archive and index templates)
  • post.tags (An array of tags, only if they were specified in a comma separated list on the markdown metadata)

You also get all your markdown metadata inside the post object, for example if you do (in your markdown file):

pi: 3.14 cat: fluffy

Then on your template you'd be able to do:

My cat is #{} and Pi is #{post.pi}

So when you use it people be like, "oh, he got the velcro".