List for cgit developers and users
 help / color / mirror / Atom feed
From: tmz at pobox.com (Todd Zullinger)
Subject: [PATCH] doc: use consistent id's when generating html files
Date: Tue, 20 Feb 2018 17:28:18 -0500	[thread overview]
Message-ID: <20180220222817.GO27038@zaya.teonanacatl.net> (raw)
In-Reply-To: <CAHmME9pcL3_VUuuS5hyoNZsAVyLVN8LSE0D0pzb=efGioHTDqw@mail.gmail.com>

The html documentation is generated using a2x which calls docbook tools
to do the work.  The generate.consistent.ids parameter ensures that when
the docbook stylesheet assigns an id value to an output element it is
consistent as long as the document structure has not changed.

Having consistent html files reduces frivolous changes between builds.
Distributions can more easily deploy multiple architecture builds and
compare changes between package versions.  End-users avoid needless
changes in files deployed or backed up.

The generate.consistent.ids parameter was added in docbook-xsl-1.77.0.
Older versions gracefully ignore the parameter, so we can pass the
parameter unconditionally.  Most distributions contain docbook-xsl newer
than 1.77.0.  This includes Fedora, Debian, Ubuntu, and RHEL/CentOS 7.
RHEL/CentOS 6 and Debian Wheezy (old stable) ship with an older version,
unsurprisingly.
---
Jason A. Donenfeld wrote:
> Seems reasonable to me. Can you resubmit with your `Signed-off-by:`?

D'oh!

I meant to check that I had the sign-off and managed to get
sidetracked before sending.  Signed-off-by: Scatterbrain. ;)

Thanks!

 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 8321ecc..687069f 100644
--- a/Makefile
+++ b/Makefile
@@ -134,7 +134,7 @@ doc-pdf: $(DOC_PDF)
 	a2x -f manpage $<
 
 $(DOC_HTML): %.html : %.txt
-	a2x -f xhtml --stylesheet=cgit-doc.css $<
+	a2x -f xhtml --stylesheet=cgit-doc.css --xsltproc-opts="--param generate.consistent.ids 1" $<
 
 $(DOC_PDF): %.pdf : %.txt
 	a2x -f pdf cgitrc.5.txt
-- 
2.16.2

-- 
Todd
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Philosophy, n. A route of many roads leading from nowhere to nothing.
    -- Ambrose Bierce, "The Devil's Dictionary"



  reply	other threads:[~2018-02-20 22:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-20 22:10 tmz
2018-02-20 22:12 ` Jason
2018-02-20 22:28   ` tmz [this message]
2018-02-21  1:36     ` tmz
2018-02-21  2:13       ` Jason

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=20180220222817.GO27038@zaya.teonanacatl.net \
    --to=cgit@lists.zx2c4.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).