From owner-dev-commits-doc-all@freebsd.org Tue Dec 22 21:59:10 2020 Return-Path: Delivered-To: dev-commits-doc-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1FFD04CA6D0 for ; Tue, 22 Dec 2020 21:59:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D0qxB0SNCz3FCM; Tue, 22 Dec 2020 21:59:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F26FB1312F; Tue, 22 Dec 2020 21:59:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BMLx9RK034744; Tue, 22 Dec 2020 21:59:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BMLx9qD034743; Tue, 22 Dec 2020 21:59:09 GMT (envelope-from git) Date: Tue, 22 Dec 2020 21:59:09 GMT Message-Id: <202012222159.0BMLx9qD034743@gitrepo.freebsd.org> To: doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org From: John Baldwin Subject: git: 86bba6a538 - Add infrastructure for links to Git commits. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: doc X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 86bba6a538e51a18204651cf9a9a72fceec839d4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-doc-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the doc repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Dec 2020 21:59:10 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/doc/commit/?id=86bba6a538e51a18204651cf9a9a72fceec839d4 commit 86bba6a538e51a18204651cf9a9a72fceec839d4 Author: John Baldwin AuthorDate: 2020-12-21 18:54:42 +0000 Commit: John Baldwin CommitDate: 2020-12-22 21:48:38 +0000 Add infrastructure for links to Git commits. - Add a tag which accepts a Git hash. Leave as is for svn revisions. In theory we could add a new attribute to to say which VCS to use, but this would require tagging either all SVN revisions or all Git hashes explicitly which would be invasive. A new tag going forward seems simpler. - Revert svnweb.link back to generating svnweb links. This fixes all the explicit 's referring to SVN src commits in existing documentation. - Add a cgit.link which links to a Git commit in cgit. githash generates cgit.link's when asked to generate a href. Reviewed by: gjb, ygy Differential Revision: https://reviews.freebsd.org/D27703 --- share/misc/docbook.css | 4 ++++ share/xml/docbook50.dtd | 16 +++++++++++++--- share/xml/freebsd-common.xsl | 15 ++++++++++++++- share/xml/freebsd-fo.xsl | 17 +++++++++++++++++ share/xml/freebsd-xhtml-common.xsl | 18 ++++++++++++++++++ share/xml/freebsd50.rnc | 1 + 6 files changed, 67 insertions(+), 4 deletions(-) diff --git a/share/misc/docbook.css b/share/misc/docbook.css index c4029cf975..38e7bf476e 100644 --- a/share/misc/docbook.css +++ b/share/misc/docbook.css @@ -265,6 +265,10 @@ html { color: #007a00; } +.gitref { + color: #007a00; +} + .guimenu, .guimenuitem, .guisubmenu, .guilabel, .interface, .shortcut, .shortcut .keycap { diff --git a/share/xml/docbook50.dtd b/share/xml/docbook50.dtd index 9bb6f37f10..365f54eddc 100644 --- a/share/xml/docbook50.dtd +++ b/share/xml/docbook50.dtd @@ -321,7 +321,7 @@ > + revnumber|buildtarget|xi:include|githash)*> - + + + + + + revnumber|buildtarget|githash)*> + + + + + @@ -25,7 +30,15 @@ - + + + + + + + diff --git a/share/xml/freebsd-fo.xsl b/share/xml/freebsd-fo.xsl index 3d786b2de7..102e4dba31 100644 --- a/share/xml/freebsd-fo.xsl +++ b/share/xml/freebsd-fo.xsl @@ -581,6 +581,23 @@ + + + + + + + + + + + + + + + + + diff --git a/share/xml/freebsd-xhtml-common.xsl b/share/xml/freebsd-xhtml-common.xsl index 3f90b34249..abc66af2d4 100644 --- a/share/xml/freebsd-xhtml-common.xsl +++ b/share/xml/freebsd-xhtml-common.xsl @@ -212,6 +212,24 @@ + + + + + + + + + + + + + + + + + + https://www.FreeBSD.org/cgi/man.cgi?query= diff --git a/share/xml/freebsd50.rnc b/share/xml/freebsd50.rnc index a240d0317a..695542c1c6 100644 --- a/share/xml/freebsd50.rnc +++ b/share/xml/freebsd50.rnc @@ -39,6 +39,7 @@ include "/usr/local/share/xml/docbook/5.0/rng/docbook.rnc" inherit = db { # FreeBSD extension: add buildtarget element to allowed inlines db.extension.inlines = db.buildtarget | db.revnumber + | db.githash # | db.trademark