Re: [PATCH] Rename {git- => git}remote-helpers.txt

Subsystems: documentation, the rest

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] Rename {git- => git}remote-helpers.txt

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:56:01

John Keeping [off-list ref] writes:
Yes.  Should I change it to "git-remote-helpers.html.in" and then copy
it into place?  That seems like the simplest answer and means that
"*.html" will continue to refer only to generated files.
I'd like to see if we can have a way to keep its look as the default
css gets updated without maintainance burden.

How about using AsciiDoc instead of "cp", perhaps like this on top
of your patch?

 Documentation/.gitignore              |  1 -
 Documentation/Makefile                |  9 +++++-
 Documentation/git-remote-helpers.txto | 26 +++++++++++++++++
 Documentation/git-remote-helpers.html | 55 -----------------------------------
 4 files changed, 34 insertions(+), 57 deletions(-)
diff --git a/Documentation/.gitignore b/Documentation/.gitignore
index 4685378..d62aebd 100644
--- a/Documentation/.gitignore
+++ b/Documentation/.gitignore
@@ -1,6 +1,5 @@
 *.xml
 *.html
-!git-remote-helpers.html
 *.[1-8]
 *.made
 *.texi
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 13e0098..fa2f9f9 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -13,7 +13,8 @@ MAN_TXT = $(MAN1_TXT) $(MAN5_TXT) $(MAN7_TXT)
 MAN_XML=$(patsubst %.txt,%.xml,$(MAN_TXT))
 MAN_HTML=$(patsubst %.txt,%.html,$(MAN_TXT))
 
-DOC_HTML=$(MAN_HTML) git-remote-helpers.html
+OBSOLETE_HTML = git-remote-helpers.html
+DOC_HTML=$(MAN_HTML) $(OBSOLETE_HTML)
 
 ARTICLES = howto-index
 ARTICLES += everyday
@@ -261,6 +262,12 @@ $(MAN_HTML): %.html : %.txt asciidoc.conf
 		$(ASCIIDOC_EXTRA) -agit_version=$(GIT_VERSION) -o $@+ $< && \
 	mv $@+ $@
 
+$(OBSOLETE_HTML): %.html : %.txto asciidoc.conf
+	$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
+	$(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf \
+		$(ASCIIDOC_EXTRA) -agit_version=$(GIT_VERSION) -o $@+ $< && \
+	mv $@+ $@
+
 manpage-base-url.xsl: manpage-base-url.xsl.in
 	sed "s|@@MAN_BASE_URL@@|$(MAN_BASE_URL)|" $< > $@
 
diff --git a/Documentation/git-remote-helpers.txto b/Documentation/git-remote-helpers.txto
new file mode 100644
index 0000000..a966013
--- /dev/null
+++ b/Documentation/git-remote-helpers.txto
@@ -0,0 +1,25 @@
+git-remote-helpers(1)
+=====================
+
+NAME
+----
+git-remote-helpers - obsoleted page
+
+SYNOPSIS
+--------
+See linkgit:gitremote-helpers[1].
+
+DESCRIPTION
+-----------
+This document has been moved to linkgit:gitremote-helpers[1].
+
+Please let the owners of the referring site know so that they can update the
+link you clicked to get here.
+
+SEE ALSO
+--------
+linkgit:gitremote-helpers[1]
+
+GIT
+---
+No longer a part of the linkgit:git[1] suite
diff --git a/Documentation/git-remote-helpers.html b/Documentation/git-remote-helpers.html
deleted file mode 100644
index 0c5ec27..0000000
--- a/Documentation/git-remote-helpers.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
-<title>git-remote-helpers(1) - Document Moved</title>
-<style type="text/css">
-/* Cut-down styles from asciidoc.css. */
-
-/* Default font. */
-body {
-  font-family: Georgia,serif;
-}
-
-/* Title font. */
-h1 {
-  font-family: Arial,Helvetica,sans-serif;
-}
-
-body {
-  margin: 1em 5% 1em 5%;
-}
-
-a {
-  color: blue;
-  text-decoration: underline;
-}
-a:visited {
-  color: fuchsia;
-}
-
-h1, h2, h3, h4, h5, h6 {
-  color: #527bbd;
-  margin-top: 1.2em;
-  margin-bottom: 0.5em;
-  line-height: 1.3;
-}
-
-</style>
-</head>
-<body class="manpage">
-<div id="header">
-<h1>
-Document Moved
-</h1>
-</div>
-
-<p>This document is now called <a
-href="gitremote-helpers.html">gitremote-helpers</a>.</p>
-
-<p>Please let the owners of the referring site know so that they can update the
-link you clicked to get here.</p>
-
-</body>
-</html>

Re: [PATCH] Rename {git- => git}remote-helpers.txt

From: John Keeping <hidden>
Date: 2016-06-15 22:56:01

On Thu, Jan 31, 2013 at 02:43:20PM -0800, Junio C Hamano wrote:
John Keeping [off-list ref] writes:
quoted
Yes.  Should I change it to "git-remote-helpers.html.in" and then copy
it into place?  That seems like the simplest answer and means that
"*.html" will continue to refer only to generated files.
I'd like to see if we can have a way to keep its look as the default
css gets updated without maintainance burden.

How about using AsciiDoc instead of "cp", perhaps like this on top
of your patch?
I tried AsciiDoc first but didn't like the output.  I think putting "See
gitremote-helpers" in the synopsis is the magic I was missing.  This
looks good to me.


John
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help