Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

tleunen/react-gist

Repository files navigation

react-gist

NPM

Use this component to add a github gist on your website.

Preview

Get the id from the gist url https://gist.github.com/{your_name}/{id} and set it as a property of the component.

Example

Single-file gist:

var React = require('react');
var Gist = require('react-gist');
React.render(
 <Gist id='5104372' />,
 document.body
);

Edit react-gist-example-single-file

Multi-file gist:

var React = require('react');
var Gist = require('react-gist');
React.render(
 <Gist id='5995ea726914f280afb3' file='Chef-Dockerfile' />,
 document.body
);

Edit react-gist-example-multi-file

Usage

<Gist id={string} file={string} />

  • id {string} Id of the gist
  • file {string} Name of a specific file in a multi-file gist

License

MIT, see LICENSE.md for details.

About

Github Gist React component

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 6

AltStyle によって変換されたページ (->オリジナル) /