Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
git-manpages-l10n
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
yun hwak byeon
git-manpages-l10n
Commits
4e87701f
Commit
4e87701f
authored
5 years ago
by
Jean-Noël Avila
Browse files
Options
Downloads
Plain Diff
Merge branch 'asciidoctor-extension'
parents
f739239b
a26d455f
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
asciidoctor-extensions.rb
+28
-0
28 additions, 0 deletions
asciidoctor-extensions.rb
makefile.locale
+8
-3
8 additions, 3 deletions
makefile.locale
with
36 additions
and
3 deletions
asciidoctor-extensions.rb
0 → 100644
+
28
−
0
View file @
4e87701f
require
'asciidoctor'
require
'asciidoctor/extensions'
module
Git
module
Documentation
class
LinkGitProcessor
<
Asciidoctor
::
Extensions
::
InlineMacroProcessor
use_dsl
named
:chrome
def
process
(
parent
,
target
,
attrs
)
prefix
=
parent
.
document
.
attr
(
'git-relative-html-prefix'
)
if
parent
.
document
.
doctype
==
'book'
"<ulink url=
\"
#{
prefix
}#{
target
}
.html
\"
>"
\
"
#{
target
}
(
#{
attrs
[
1
]
}
)</ulink>"
elsif
parent
.
document
.
basebackend?
'html'
%(<a href="
#{
prefix
}#{
target
}
.html">
#{
target
}
(
#{
attrs
[
1
]
}
)</a>)
elsif
parent
.
document
.
basebackend?
'manpage'
"
#{
target
}
(
#{
attrs
[
1
]
}
)"
end
end
end
end
end
Asciidoctor
::
Extensions
.
register
do
inline_macro
Git
::
Documentation
::
LinkGitProcessor
,
:linkgit
end
This diff is collapsed.
Click to expand it.
makefile.locale
+
8
−
3
View file @
4e87701f
...
...
@@ -22,7 +22,7 @@ include ../../Makefile
XMLTO_EXTRA
+=
--searchpath
../..
ifdef
USE_ASCIIDOCTOR
ASCIIDOC_EXTRA
+=
-I
../..
ASCIIDOC_EXTRA
+=
-I
../..
-I
.
-rasciidoctor-extensions
else
ASCIIDOC_CONF
=
-f
../../asciidoc.conf
endif
...
...
@@ -43,12 +43,17 @@ ifndef V
QUIET_ASCIIDOC
=
@echo
' '
ASCIIDOC
$(
lang
)
$@
;
endif
-include
../GIT-VERSION-FILE
$(HTML_FILTER)
:
%.html: %.txt
$(
QUIET_ASCIIDOC
)
asciidoctor
-b
xhtml5
-d
manpage
$<
$(
QUIET_ASCIIDOC
)
asciidoctor
-b
xhtml5
-d
manpage
-d
manpage
-I
..
-I
.
-rasciidoctor-extensions
\
-amanversion
=
$(
GIT_VERSION
)
-amanmanual
=
'Git Manual'
-amansource
=
'Git
$(
GIT_VERSION
)
'
$<
MANPAGES
=
$(
patsubst %.txt,%.1,
$(
MAN_FILTER
))
$(MANPAGES)
:
%.1: %.txt
$(
QUIET_ASCIIDOC
)
asciidoctor
-b
manpage
-d
manpage
-o
$@
$<
$(
QUIET_ASCIIDOC
)
asciidoctor
-b
manpage
-d
manpage
-o
$@
\
-I
.
-I
..
-rasciidoctor-extensions
\
-amanmanual
=
'Git Manual'
-amansource
=
'Git
$(
GIT_VERSION
)
'
$<
man
:
$(MANPAGES)
html
:
$(HTML_FILTER)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment