Pro Code Widgets


Activate a GitPitch Paid Plan to unlock Pro Code Widgets.

The Pro Code and Pro GIST widgets support the targeted injection of source code directly on your slides - including directly into any location on the Snap Layouts Grid.


The Code Widget

The Code Widget renders source code from any file directly onto your slide. All paths are relative to the root directory of your local working directory or repository. The widget is created using the following @code syntax in your PITCHME.md markdown file:

@code[lang-hint ...](path/to/file.ext)

The lang-hint must be specified as the first property on this widget. For details, see The Importance of Code Language Hints. The following markdown snippet uses the @code widget to render a sample Go source file:

@code[golang](src/go/sample.go)

This markdown snippet renders as follows:

PRO-CODE-WIDGET

The @code widget works seamlessly with traditional GitPitch live code presenting with annotations. For example:


@code[golang](src/go/sample.go)

@snap[south span-100]
@[1](You can step through your code directly within your slide deck.)
@[3](Using the GitPitch live code presenting with annotations feature.)
@[5-7](Which means no need to switch back and forth between your slide deck and IDE.)
@snapend



The GIST Widget

The GitHub GIST Widget renders source code from any GitHub GIST directly onto your slide. This feature is available to all presentations whether hosted on GitHub, GitLab, or Bitbucket. The widget is created using the following @gist syntax in your PITCHME.md markdown file:

@gist[lang-hint ...](username/gist)

The lang-hint must be specified as the first property on this widget. For details, see The Importance of Code Language Hints. The following markdown snippet uses the @gist widget to render a sample Groovy source file:

@gist[groovy](onetapbeyond/8da53731fd54bab9d5c6)

This markdown snippet renders as follows:

PRO-GIST-WIDGET

The @gist widget works seamlessly with traditional GitPitch live code presenting with annotations. For example:


@gist[groovy](onetapbeyond/8da53731fd54bab9d5c6)

@snap[south span-100]
@[1](You can step through your code directly within your slide deck.)
@[3](Using the GitPitch live code presenting with annotations feature.)
@[5-7](Which means no need to switch back and forth between your slide deck and IDE.)
@snapend