embed-plugin-github

5.0.4 • Public • Published

embed-plugin-github

A plugin that can be used to embed GitHub repo description.

Installation

npm i -S embed-js embed-plugin-github

CDN

https://unpkg.com/embed-plugin-github

Usage

Edit embed.js - GitHub

Embeds repository data in the website. Supports repo URLs. Usage is simple.

import EmbedJS from 'embed-js'
import github from 'embed-plugin-github'
 
const x = new EmbedJS({
  input: document.getElementById('element'),
  plugins: [
  github({
    regex: /githubRepoRegex/gi, // in case you want to define a custom regex
    template(args) {
      // optional template
    }
   })
 ]
})

When you click on the link URL, it redirects you to the repo URL.

License

MIT @ Ritesh Kumar

Readme

Keywords

none

Package Sidebar

Install

npm i embed-plugin-github

Weekly Downloads

163

Version

5.0.4

License

MIT

Unpacked Size

61.6 kB

Total Files

9

Last publish

Collaborators

  • ritz078