asciidoctor-foodogsquared-e.../lib/asciidoctor/gitlab-raw-content-include-processor
Gabriel Arazas 869181bafa Update Asciidoctor extension dependency
Asciidoctor already handles the caching so we don't really need to. On
the plus side, it gives some choice whether the pipeline should have a
cache or not.
2023-05-28 17:49:15 +08:00
..
extension.rb Update Asciidoctor extension dependency 2023-05-28 17:49:15 +08:00
README.adoc Update documentation for various Asciidoctor extensions 2023-04-16 11:08:11 +08:00

Its a include processor for easily including raw content from GitLab repositories.

Synopsis

Unresolved directive in <stdin> - include::gitlab/$OWNER/$REPO[rev=$COMMIT, path=$FILEPATH]

Extra notes

A personal access token is most likely required. Get one and place the value in an environment variable GITLAB_API_PERSONAL_ACCESS_TOKEN.

Attributes

There are some attributes required to be passed.

  • rev is the commit to be checked out.

  • path is the file path to be included.

Aside from the required attributes, there are optional attributes to configured further.

  • domain is the domain of the GitLab instance. By default, it points to the gitlab.com official instance.

  • version is the version string of the API to be used. By default, it uses version v4.

Example usage

  • include::gitlab:gitlab-org/gitlab[rev=master, path=README.md] should include the README content from the master branch of GitLab source code.

  • include::freedesktop-sdk/freedesktop-sdk[rev=bcb3e0de957519e87a4c7b8c0e40af9876e531e7, path=.gitlab-ci.yml] should transclude the GitLab CI configuration from Freedesktop SDK.

  • include::World/warp[domain=gitlab.gnome.org, rev=v0.5.2, path=meson_options.txt] includes meson_options.txt from Warp source code at v0.5.2.