{"id":15525571,"url":"https://github.com/jakzal/asciidoctor-git-include","last_synced_at":"2026-02-12T06:32:02.857Z","repository":{"id":171011864,"uuid":"647325469","full_name":"jakzal/asciidoctor-git-include","owner":"jakzal","description":"AsciiDoctor extension that enables file includes from Git repositories","archived":false,"fork":false,"pushed_at":"2025-02-11T13:45:07.000Z","size":98,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-29T22:42:35.814Z","etag":null,"topics":["asciidoctor","asciidoctor-extension","diff","git","include"],"latest_commit_sha":null,"homepage":"https://jakzal.github.io/asciidoctor-git-include/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jakzal.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-05-30T14:34:53.000Z","updated_at":"2025-02-11T13:44:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"17c4d600-41a2-41c6-898c-7bf01b733ae1","html_url":"https://github.com/jakzal/asciidoctor-git-include","commit_stats":null,"previous_names":["jakzal/asciidoctor-git-include"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/jakzal/asciidoctor-git-include","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakzal%2Fasciidoctor-git-include","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakzal%2Fasciidoctor-git-include/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakzal%2Fasciidoctor-git-include/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakzal%2Fasciidoctor-git-include/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jakzal","download_url":"https://codeload.github.com/jakzal/asciidoctor-git-include/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakzal%2Fasciidoctor-git-include/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29360644,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T01:03:07.613Z","status":"online","status_checked_at":"2026-02-12T02:00:06.911Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asciidoctor","asciidoctor-extension","diff","git","include"],"created_at":"2024-10-02T10:58:42.011Z","updated_at":"2026-02-12T06:32:02.842Z","avatar_url":"https://github.com/jakzal.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"= AsciiDoctor Git includes extension\nifndef::env-github[:icons: font]\nifdef::env-github[]\n:caution-caption: :fire:\n:important-caption: :exclamation:\n:note-caption: :paperclip:\n:tip-caption: :bulb:\n:warning-caption: :warning:\nendif::[]\n\nAn AsciiDoctor extension that enables file includes from Git repositories.\nIt only affects `include` directives for URIs beginning with `git@`.\n\nThe extension can be used to include code examples from specific revisions in a git repository.\n\n== Requirements\n\n`git` command is available in `PATH`.\n\n== Installation\n\nWith Ruby Gems:\n\n    gem install asciidoctor-git-include\n\n== Usage\n\n=== Command line\n\nLoad the extension:\n\n    asciidoctor -r asciidoctor-git-include [index.adoc]\n\nThen, inside your AsciiDoc file, use an `include` statement like normal, pointing to an URI that begins with `git@`.\n\n=== Supported attributes\n\n* `repository` - path to the Git repository (default: `.`)\n* `revision` - repository revision to use (default: `HEAD`)\n* `lines` - specify the lines to include (i.e. `lines=2..5;10;12`)\n* `diff` - include a patch for the given `revision`, or between two revisions (see examples)\n* `difftarget` - tell what the path of the target was before the changes (in case the target file was renamed)\n* `ignorewhitespaces` - whether to ignore whitespaces and newlines changes in an included patch\n\n// tag::examples[]\n\n== Examples\n\nExamples with actual rendered output can be found on https://jakzal.github.io/asciidoctor-git-include/.\nThe source is taken from xref:examples/index.adoc[].\n\n=== Basic\n\nSave this one-line Asciidoc file as `README.adoc`:\n\n----\n\\include::git@README.adoc[]\n----\n\nThen run\n\n    asciidoctor -r asciidoctor-git-include README.adoc\n\nand open `README.html` in your browser.\n\n=== Changing the repository and revision\n\n----\n\\include::git@README.adoc[repository=/path/to/repository,revision=dbe7eb05972d24eb153495b543fe5ba0b362b0b1]\n----\n\n=== Changing the branch\n\n----\n\\include::git@README.adoc[revision=develop]\n----\n\n=== Changing the path\n\nPaths within the repository work as usual:\n\n----\n\\include::git@path/within/repo/file.rb[]\n----\n\n=== Specifying lines to include\n\n----\n\\include::git@README.adoc[lines=2..5;10;12]\n----\n\n=== Including a patch for a specific revision\n\nTo generate a patch for changes introduced in a specific revision (b015e8dd):\n\n----\n\\include::git@path/within/repo/file.rb[revision=b015e8dd,diff]\n----\n\n=== Including a patch for specific revisions\n\nTo generate a patch for changes between two revisions (b015e8dd and b015e8dd):\n\n----\n\\include::git@path/within/repo/file.rb[revision=b015e8dd,diff=0245ac72]\n----\n\n=== Including a patch of a file that has been renamed\n\nTo generate a patch for changes between two revisions (b015e8dd and b015e8dd) where a file has been renamed:\n\n----\n\\include::git@path/within/repo/file.rb[revision=b015e8dd,diff=0245ac72,difftarget=path/within/repo/previous_file.rb]\n----\n\n=== Including a patch ignoring whitespaces\n\nTo generate a patch for changes introduced in a specific revision (b015e8dd) but ignoring the changes related to whitespaces and caret line return:\n\n----\n\\include::git@path/within/repo/file.rb[revision=b015e8dd,diff,ignorewhitespaces]\n----\n\n// end::examples[]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakzal%2Fasciidoctor-git-include","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjakzal%2Fasciidoctor-git-include","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakzal%2Fasciidoctor-git-include/lists"}