diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-07-22 14:17:55 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-07-23 11:02:52 -0700 |
| commit | d44ce6ddd5f1b8c5f5a18abed22ada1b48e893ba (patch) | |
| tree | 3517fea515a3e79a5074b8792600fff07dcf2255 | |
| parent | 8bfc3e47a73b108fd8e7f9c3b9e7714b9f418fa8 (diff) | |
| download | git-d44ce6ddd5f1b8c5f5a18abed22ada1b48e893ba.tar.gz | |
Doc: fix Asciidoctor css workaround
The previous step introduced docinfo.html to be used to tweak the
CSS used by the asciidoctor, that by default renders <code> inside
<pre> as a block element, breaking the SYNOPSIS section of a few
pages that adopted a new convention we use since Git 2.45.
But in this project, HTML files are all generated. We do not force
any human to write HTML by hand, which is an unusual and cruel
punishment. "*.html" is in the .gitignore file, and "make clean"
removes them. Having a tracked .html file makes "make clean" make
the tree dirty by removing the tracked docinfo.html file.
Let's do an obvious, minimum and stupid workaround to generate that
file at runtime instead. The mark-up is being rethought in a major
way for the next development cycle, and the CSS workaround we added
in the previous step may have to adjusted, possibly in a large way,
anyway.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
| -rw-r--r-- | Documentation/.gitignore | 1 | ||||
| -rw-r--r-- | Documentation/Makefile | 5 | ||||
| -rw-r--r-- | Documentation/docinfo-html.in (renamed from Documentation/docinfo.html) | 0 |
3 files changed, 5 insertions, 1 deletions
diff --git a/Documentation/.gitignore b/Documentation/.gitignore index d11567fbbe..a48448de32 100644 --- a/Documentation/.gitignore +++ b/Documentation/.gitignore @@ -1,6 +1,5 @@ *.xml *.html -!/docinfo.html *.[1-8] *.made *.texi diff --git a/Documentation/Makefile b/Documentation/Makefile index 78e407e4bd..371d56eb5e 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -209,6 +209,8 @@ XMLTO_EXTRA += --skip-validation XMLTO_EXTRA += -x manpage.xsl endif +ASCIIDOC_DEPS += docinfo.html + SHELL_PATH ?= $(SHELL) # Shell quote; SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH)) @@ -337,6 +339,9 @@ clean: $(RM) $(cmds_txt) $(mergetools_txt) *.made $(RM) GIT-ASCIIDOCFLAGS +docinfo.html: docinfo-html.in + $(QUIET_GEN)$(RM) $@ && cat $< >$@ + $(MAN_HTML): %.html : %.txt $(ASCIIDOC_DEPS) $(QUIET_ASCIIDOC)$(TXT_TO_HTML) -d manpage -o $@ $< diff --git a/Documentation/docinfo.html b/Documentation/docinfo-html.in index fb3560eb92..fb3560eb92 100644 --- a/Documentation/docinfo.html +++ b/Documentation/docinfo-html.in |
