Github Gist

Code snippets may helpful to support your readers for existing code examples. An excellent place for code snippets is Gist at Github. To embed an existing gist into your documents, the Asciidoc Extention *Gist block* provides the block macro `gist::` to do so.

The following gist snippet is taken from {asciidoc-extensions-gist-example}[this example, window=“_blank”]:

source, prometheus, role=“noclip”

.Gist title gist::git_address[] <1>


<1> For `git_address`, {github-gist-home}[, window=“_blank”] is prepended automatically

.Example of a gist block

source, prometheus, role=“noclip”

.Guard setup to live preview AsciiDoc output gist::mojavelinux/5546622[]


.result

.Guard setup to live preview AsciiDoc output gist::mojavelinux/5546622[]