Skip to content
This repository was archived by the owner on Nov 3, 2019. It is now read-only.

Files

Latest commit

 

History

History

gitsnippet

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

GitSnippet

Render snippets of code intelligently from git repos

Installation

yarn add gitsnippet

Usage

GitSnippet accepts a git revision as a string pointing to the appropriate file at the desired revision. You can also choose to highlight or hide ranges of code.

import GitSnippet from 'gitsnippet';

# My Awesome Documentation

Here's what our README says about foos:

<GitSnippet
  revision={"master:./README"}
  highlightRange={"5-6, 14-17"}
  hidelineRange={"1-3"}
/>