git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael J Gruber <git@drmicha.warpmail.net>
To: git@vger.kernel.org
Cc: Michael J Gruber <git@drmicha.warpmail.net>
Subject: [PATCH/RFC 1/6] modified asciidoc macros for dashless git doc
Date: Fri, 12 Sep 2008 12:55:20 +0200	[thread overview]
Message-ID: <1221216926-20435-2-git-send-email-git@drmicha.warpmail.net> (raw)
In-Reply-To: <1221216926-20435-1-git-send-email-git@drmicha.warpmail.net>

This introduces a new macro "link-git" which prepends "git-" or "git "
to the link target, depending on the backend. We keep the dash for the
docbook backend because some man viewers depend on it. There are no
dashes for the html backend.

This patch also renames the existing "linkgit" macro to "linkgitasis", in
preparation for the upcoming changes. This makes it easier to split the
changes into parts: dashed form for server type programmes, dashless
form for all other commands.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
 Documentation/asciidoc.conf |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf
index 40d43b7..efc8bd3 100644
--- a/Documentation/asciidoc.conf
+++ b/Documentation/asciidoc.conf
@@ -1,11 +1,15 @@
-## linkgit: macro
+## linkgitasis: macro
 #
-# Usage: linkgit:command[manpage-section]
+# Usage: linkgitasis:command[manpage-section]
 #
 # Note, {0} is the manpage section, while {target} is the command.
 #
 # Show GIT link as: <command>(<section>); if section is defined, else just show
 # the command.
+#
+## link-git: macro
+#
+# Like linkgitasis, but prepends "git " or "git -" to the target, depending on the backend.
 
 [attributes]
 asterisk=&#42;
@@ -16,11 +20,16 @@ endsb=&#93;
 tilde=&#126;
 
 ifdef::backend-docbook[]
-[linkgit-inlinemacro]
+[linkgitasis-inlinemacro]
 {0%{target}}
 {0#<citerefentry>}
 {0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
 {0#</citerefentry>}
+[link-git-inlinemacro]
+{0%{target}}
+{0#<citerefentry>}
+{0#<refentrytitle>git-{target}</refentrytitle><manvolnum>{0}</manvolnum>}
+{0#</citerefentry>}
 endif::backend-docbook[]
 
 ifdef::backend-docbook[]
@@ -62,6 +71,8 @@ endif::backend-docbook[]
 endif::doctype-manpage[]
 
 ifdef::backend-xhtml11[]
-[linkgit-inlinemacro]
+[linkgitasis-inlinemacro]
 <a href="{target}.html">{target}{0?({0})}</a>
+[link-git-inlinemacro]
+<a href="{target}.html">git {target}{0?({0})}</a>
 endif::backend-xhtml11[]
-- 
1.6.0.1.308.gede4c

  reply	other threads:[~2008-09-12 10:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-12 10:55 [PATCH/RFC 0/6] Documentation: use dashless links Michael J Gruber
2008-09-12 10:55 ` Michael J Gruber [this message]
2008-09-12 10:55   ` [PATCH/RFC 2/6] convert doc links for server type programmes from linkgit to gitlink Michael J Gruber
2008-09-12 10:55     ` [PATCH/RFC 2/6] convert doc links for server type programmes Michael J Gruber
2008-09-12 10:55       ` [PATCH/RFC 3/6] convert doc links for non-dashed git commands Michael J Gruber
2008-09-12 10:55         ` [PATCH/RFC 4/6] convert doc links for other pages Michael J Gruber
     [not found]           ` <1221216926-20435-7-git-send-email-git@drmicha.warpmail.net>
2008-09-12 10:55             ` [PATCH/RFC 6/6] adjust the command lists (by category) to the new doc link macros Michael J Gruber
2008-09-12 11:32     ` [PATCH/RFC 2/6] convert doc links for server type programmes from linkgit to gitlink Michael J Gruber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1221216926-20435-2-git-send-email-git@drmicha.warpmail.net \
    --to=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).