1.4 KiB
This is a include processor for easily including files from GitHub. Take note this will only include files. For directories, submodules, or symlinks: they will not be processed and a warning will be issued.
This extension honors the safe mode setting and the prerequisites for permitting includes with URI.
The following is the basic form of using this include processor.
link:github:$OWNER/$REPO[role=include]
Attributes
-
path
for the path of the file to be included. This is practically required as the root entry of the repository is a directory. -
rev
is the name of the commit/tag/branch to be checked out.
Example usage
-
include::github:asciidoctor/asciidoctor[path=README.adoc, rev=v2.0.0]
will include the Asciidoc file from the Asciidoctor GitHub repo from the point ofv2.0.0
. -
include::github:NixOS/nixpkgs[path=shell.nix]
will get the latest revision ofshell.nix
from nixpkgs repository. -
include::github:foo-dogsquared/nixos-config[]
should not be processed considering it points to the root directory of the repository.