git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH/RFC 1/6] modified asciidoc macros for dashless git doc

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Sep 12, 2008, 10:55 UTC
Message-ID
<1221216926-20435-2-git-send-email-git@drmicha.warpmail.net>
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
Previous: Michael J GruberNext: Michael J Gruber
Message 2 of 8 in “Documentation: use dashless links”
  1. 0/6 Documentation: use dashless linksMichael J Gruber, Sep 12, 2008
  2. 1/6 modified asciidoc macros for dashless git docMichael J Gruber, Sep 12, 2008
  3. 2/6 convert doc links for server type programmes from linkgit to gitlinkMichael J Gruber, Sep 12, 2008
  4. 2/6 convert doc links for server type programmesMichael J Gruber, Sep 12, 2008
  5. 3/6 convert doc links for non-dashed git commandsMichael J Gruber, Sep 12, 2008
  6. 4/6 convert doc links for other pagesMichael J Gruber, Sep 12, 2008
  7. Michael J GruberSep 12, 2008
  8. 6/6 adjust the command lists (by category) to the new doc link macrosMichael J Gruber, Sep 12, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.