website/gems/lib/asciidoctor/github-raw-content-include-processor
2023-03-07 00:35:19 +08:00
..
extension.rb Reformat codebase 2023-03-07 00:35:19 +08:00
README.adoc Add GitHub raw content include processor 2023-03-05 09:48:36 +08:00

Table of Contents

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.

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 of v2.0.0.

  • include::github:NixOS/nixpkgs[path=shell.nix] will get the latest revision of shell.nix from nixpkgs repository.

  • include::github:foo-dogsquared/nixos-config[] should not be processed considering it points to the root directory of the repository.