0.1.7 • Published 11 years ago

velcro v0.1.7

Weekly downloads
4
License
-
Repository
github
Last release
11 years ago

Velcro

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

Velcro in the terminal

Installation

npm install velcro

Usage

Options:

-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

Commands:

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 deploy.sh file.

velcro daemon watch -> compile and deploy.

Configuration

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

{
"name":"Velcro",
"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.

Themes

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.

    Templates

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

    Main Properties:

  • description (blog description, stored in velcro.json) - p= description

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

    Post Data

  • post.author (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)
  • post.date (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)

    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 #{post.cat} and Pi is #{post.pi}

    Why velcro?

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

    dateformat: http://blog.stevenlevithan.com/archives/date-time-format

    terminal: http://i.cubeupload.com/KCWj4z.png

0.1.7

11 years ago

0.1.6

11 years ago

0.1.5

11 years ago

0.1.4

11 years ago

0.1.3

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago