Add gitref macro to reference a git hash
With this extension a git hash can be easily referenced. The porters handbook versions chapter uses this extension as an example in the FreeBSD 14.0 version table. An example of use gitref:hash[repository="src|doc|ports",length=hash-longitude] The repository should be src, doc or ports. And if no length it's specified the macro will use 12 characters of the specified hash. PR: 253050 Submitted by: jhb@
This commit is contained in:
parent
ba631cb51b
commit
fb36cfdfb2
5 changed files with 36 additions and 6 deletions
5
shared/lib/git-macro.rb
Normal file
5
shared/lib/git-macro.rb
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
RUBY_ENGINE == 'opal' ? (require 'GitReferencesMacro/extension') : (require_relative 'GitReferencesMacro/extension')
|
||||
|
||||
Asciidoctor::Extensions.register do
|
||||
inline_macro GitReferencesMacro
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue