🚀 Launch Week Day 3:Introducing Supply Chain Attack Campaigns Tracking.Learn More →
Socket
Book a DemoInstallSign in
Socket

handlebars-helper-ghbtns

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

handlebars-helper-ghbtns

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

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

{{github}} NPM version

Handlebars helper for adding github buttons to your site.

Installation

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

Register the helper

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']
    }
  }
});

Usage

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

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

Options

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

user

Type: String Default: undefined

The GitHub user or org. Example: jonschlinkert.

repo

Type: String Default: undefined

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

type

Type: String Default: undefined

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

count

Type: String Default: true

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

width

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.

height

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.

size

Type: String Default: none

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

Author

Jon Schlinkert

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

Keywords

assemble

FAQs

Package last updated on 13 Dec 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts