asciidoctor / asciidoctor-extensions-lab

A lab for testing and demonstrating Asciidoctor extensions. Please do not use this code in production. If you want to use one of these extensions in your application, create a new project, import the code, and distribute it as a RubyGem. You can then request to make it a top-level project under the Asciidoctor organization.
Other
105 stars 101 forks source link

Git metadata inline macro #95

Closed danyill closed 2 years ago

danyill commented 6 years ago

This is a macro to allow extraction of git metadata when providing a named commit, branch or tag. It allows extraction of messages, hashes, date, time, time zone.

My Ruby is functional but quite crude.

There is a question in the sample.adoc about nesting macros. Maybe that's impossible but it would be nice to be able to invoke this macro once on an annotated tag to get the most recent commit name and then invoke it again to get the commit date (for example).

Happy to make changes as required.

mojavelinux commented 12 months ago

I went ahead and merged this in as 96fdfdd74e4195fabf9ff5ccd5a515997390cba3. No guarantees ;)