Skip to content

Embed gists, then reuse portions of them preserving their original line numbers (also, only retrieves each gist once... reusing it for additional references in your page).

Notifications You must be signed in to change notification settings

stannehill/gist-embed-customized

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

gist-embed-customized

Embed gists, then reuse portions of them preserving their original line numbers (also, only retrieves each gist once... reusing it for additional references in your page).

First, include jQuery then the gist-embed-customized.js file.

Next, in your html...

To display a full gist:

<code id="gist-6104937"></code>

To display a range of lines from a gist:

<code id="gist-6104937" data-line="11-20"></code>

To display a discrete selection of lines from a gist:

<code id="gist-6104937" data-line="5,10,14"></code>

See the included sampleindex.html file for more examples.

About

Embed gists, then reuse portions of them preserving their original line numbers (also, only retrieves each gist once... reusing it for additional references in your page).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published