git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Sebastian Schuberth <sschuberth@gmail.com>
Cc: greened@obbligato.org, Git Mailing List <git@vger.kernel.org>
Subject: Re: Why is git-subtree docs XML and not HTML?
Date: Tue, 29 Oct 2013 11:50:37 -0400	[thread overview]
Message-ID: <20131029155037.GA3628@sigill.intra.peff.net> (raw)
In-Reply-To: <CAHGBnuO1xPrAFG1tvS5zaVD9yefa2VUNYM93YLt1pQ1yJwHkrw@mail.gmail.com>

On Tue, Oct 29, 2013 at 03:03:40PM +0100, Sebastian Schuberth wrote:

> I'm currently looking at subtree's Makefile and wondering why the
> generated markup docs is git-subtree.xml, and not git-subtree.html
> like for the rest of the git commands. I have not looked at
> git-subtree.xml because I'm lacking asciidoc right now, but is it just
> a matter of changing the file extension from .xml to .html, or does
> generating a HTML file involve more work?

The XML is an intermediate format for the manpage; the original source
is .txt, from which asciidoc generate docbook .xml, from which xmlto
generate the roff git-subtree.1.

If you want HTML, you need to have asciidoc generate .html from the .txt
directly (you probably _can_ generate it from docbook, but that is more
complicated, and not how regular git commands work).

I think this would do what you want:

diff --git a/contrib/subtree/Makefile b/contrib/subtree/Makefile
index 435b2de..e9026da 100644
--- a/contrib/subtree/Makefile
+++ b/contrib/subtree/Makefile
@@ -21,6 +21,7 @@ GIT_SUBTREE    := git-subtree
 GIT_SUBTREE_DOC := git-subtree.1
 GIT_SUBTREE_XML := git-subtree.xml
 GIT_SUBTREE_TXT := git-subtree.txt
+GIT_SUBTREE_HTML := git-subtree.html
 
 all: $(GIT_SUBTREE)
 
@@ -46,6 +47,10 @@ $(GIT_SUBTREE_XML): $(GIT_SUBTREE_TXT)
 	asciidoc -b docbook -d manpage -f $(ASCIIDOC_CONF) \
 		-agit_version=$(gitver) $^
 
+$(GIT_SUBTREE_HTML): $(GIT_SUBTREE_TXT)
+	asciidoc -b xhtml11 -d manpage -f $(ASCIIDOC_CONF) \
+		-agit_version=$(gitver) $^
+
 test:
 	$(MAKE) -C t/ test
 

  reply	other threads:[~2013-10-29 15:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-29 14:03 Why is git-subtree docs XML and not HTML? Sebastian Schuberth
2013-10-29 15:50 ` Jeff King [this message]
2013-10-29 16:03   ` Sebastian Schuberth
2013-10-29 16:30     ` [PATCH] subtree: add makefile target for html docs Jeff King
2013-10-30 17:48       ` Junio C Hamano

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=20131029155037.GA3628@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=greened@obbligato.org \
    --cc=sschuberth@gmail.com \
    /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).