handlebars-helper-ghbtns

{{ghbtn}} handlebars helper. Add github buttons (http://ghbtns.com) to your site.

{{github}}

Handlebars helper for adding github buttons to your site.

Use npm to install the package: npm i handlebars-helper-gh-buttons.

In your project's Gruntfile, to register the helper add handlebars-helper-gh-buttons to the helpers property in the Assemble task or target options:

grunt.initConfig({
  assemble: {
    options: {
      // the 'handlebars-helper-gh-buttons' npm module must also be listed in 
      // devDependencies for assemble to automatically resolve the helper 
      helpers: ['handlebars-helper-gh-buttons', 'foo/*.js']
    },
    files: {
      'dist/': ['src/templates/*.hbs']
    }
  }
});

With the helper registered, you may now begin using it in your templates.

{{github user="upstage" repo="upstage" type="star"}}

The following hash options may be passed to the helper, in the form of foo="value":

Type: String Default: undefined

The GitHub user or org. Example: jonschlinkert.

Type: String Default: undefined

The GitHub repo. Example: sublime-monokai-extended.

Type: String Default: undefined

The button type. Options are star and watch for repos, and follow for users.

Type: String Default: true

Whether or not to show the count or stars, watchers or followers.

Type: String Default: undefined

The width of the rendered iframe. Allows you to override the default values that are automatically defined based on other options.

Type: String Default: undefined

The height of the rendered iframe. Allows you to override the default values that are automatically defined based on other options.

Type: String Default: none

The only option is large. When size="large" is defined, width and height will automatically be adjusted.

Jon Schlinkert

  • [github/Jon Schlinkert](http://github.com/Jon Schlinkert)
  • [twitter/Jon Schlinkert](http://twitter.com/Jon Schlinkert)

Licensed under the MIT License Copyright (c) Jon Schlinkert, contributors.