Generate and publish Github pages quickly and easily.

npm install brief
33 downloads in the last week
34 downloads in the last month


Generate and publish Github pages quickly and easily from markdown/jade templates.


  • Create a gh-pages branch.
  • Add an index.jade file which will render your content. Use read() to specify which file to use as content for your template:
p!= read("")
  • Make sure you have a file which will be injected into your jade template.
  • Run brief from cli or instantiate a brief instance and run brief.update()


If you want to customize behavior of brief you can instantiate a new brief instance with various options:

var Brief = require('brief').Brief;

var brief = new Brief({
    templateFile: 'index.jade',
    outputFile:   'index.html',
    ctx:          {title: 'Title'},
    branch:       'gh-pages',
    remote:       'origin',
    push:         true,
    quiet:        false



To update the gh-pages branch using defaults:

$ brief
> git checkout gh-pages
Switched to branch 'gh-pages'
Your branch is ahead of 'origin/gh-pages' by 1 commit.
> git add /Users/zk/go/src/
> git commit -m "Updating generated content"
[gh-pages f869f85] Updating generated content
 1 file changed, 29 insertions(+), 71 deletions(-)
 rewrite index.html (99%)
> git push -f origin gh-pages
   0052836..f869f85  gh-pages -> gh-pages
> git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.

Most configuration options are available from command line, brief --help for more detail.


Tastes good with Cake!

task 'gh-pages', 'Publish docs to gh-pages', ->
npm loves you