Include the commit in your URL because everything is cached. If you don't then your changes may not be reflected on your website.
Your script code
You can add the following code anywhere on your website and your code sample will be displayed
Query String Options
You can add the following query strings to the src of the script tag to alter the behavior of the script.
- start - The first line you would like to include in the code output.
- end - The last line you would like to inclued in the code output.
- lang - The Google Prettify language formatter to use for formatting your output. If not used, your file extension will be used. See the supported languages.
- skin - The Google Prettify skin to be used. Note that all code on the page must use the same skin. This feature works but is a little buggy in it's implementation. See the skin gallery
- source - Determines where gitsnippet should grab your code from. Github is the default. (Options are github, gitlab, or bitbucket)
The catch
This is still in beta
This is a free service, so there are no uptime or support guarantees. USE AT YOUR OWN RISK. If you want guarantees, then deploy to a server you own. It's open source. lol
There is also a 1MB file size limit for any code sample so please don't attempt to use this on HUGE files. lol