From nobody Sat Sep 07 18:12:32 2024 X-Original-To: dev-commits-doc-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4X1LmJ3nt8z5WDrD for ; Sat, 07 Sep 2024 18:12:32 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X1LmJ31LMz4c28; Sat, 7 Sep 2024 18:12:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725732752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9cvbdBSU863oDVPVgwJAFZnI49dnOTrTKb+xySHXrR8=; b=QmKKo4zTTAK8I41V8SkIeLXyJodf8czPmeRTlHEkhU0+Wut1SekeVUgRHX6owTqldv3E2S rpu5vCg2o2SLPTeS+A73Uey+swu58X6epaGVuDEyQRYdky75tMCjBpzd+JBB/Rjo7Ju0BL K/epna3R4uOojzAfMDAmnUKajR9Ph9erJW4T5D7F0TtzpkYTXbrd0w2d9WcY3xGqqyVQzI 1rJJcQg2otjoC9qoBpnUv5hS+0NK8M9ruHmDsKlrrrq49TDG/ihxyNU0nAHW/p+Zv/F9GJ t1QJAhLc7NZziob+zQzSXGHunC9jZRFpGKnOcoaEdbtR6Izo4gOVz/HKQuuhnQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725732752; a=rsa-sha256; cv=none; b=qT99zbrvW29NAZ+7kaKDs5abuwohzBCD0t4Wuz9YOwgPsLkBDp3dFbveL5jedlpqSENvk6 DZBjt4A9fsAJMDnkuQAvvccVP8cKhiczwKx2/31C9FFPbgdtYF1+dnMqA5W+tc2MNvmnF1 UP7/dmXDVmXT3FO90BAnpfE6nMD27ph9Wt+XNJ966cUGzKawmGcX4aORpi2i9TWQdky0pb QDajXKDFSblzgMs2qjLTguHNz+YF2EWmheV6SSiNl19/w1Z9YBQhGzINroCprfrnk+QMhv LFeskwiYHD1UwULKzjHMpP+AKGNZxutkLBpU8Vz31jUIxDd9aD1NEDGhqdPupw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725732752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9cvbdBSU863oDVPVgwJAFZnI49dnOTrTKb+xySHXrR8=; b=Ut5+xFvrpxORttZLPgqrCLbuhwuFr/P9QH0iCJhphQjWD0xZ/ZYqm519mSNtohozccNg5R 5bpOqAkgrNWuB4bDAq7BoEYDa7VtJZT0wifNGD0R+2mYYIXIFusMEYtxbeIQ36r+nDbJ3K AZZoN6aMgVf0Wro0lWxc26NvCANHd3kwWN81Qo645IAkS0ytCeSzEOkywKT5hC6+MXFZ+o X8547qrKhuXTUKBDL2/yrjTOL86yVQFm5ADtbSsQ3EG+97Ob1ni/QiK2t2guZfK5X96VuZ OJT32naDa6FfZKPhzyyLANUd+KhRA3c2Xi/XasYz2d6yKqwbRkCBb8dUrmQg+w== 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 4X1LmJ2cZ4zmWF; Sat, 7 Sep 2024 18:12:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 487ICWW4030795; Sat, 7 Sep 2024 18:12:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 487ICW9B030792; Sat, 7 Sep 2024 18:12:32 GMT (envelope-from git) Date: Sat, 7 Sep 2024 18:12:32 GMT Message-Id: <202409071812.487ICW9B030792@gitrepo.freebsd.org> To: doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org From: Fernando =?utf-8?Q?Apestegu=C3=ADa?= Subject: git: 0d4fa21eab - main - [fdp-primer]: Clarify link macros usage List-Id: Commit messages for all branches of the doc repository List-Archive: https://lists.freebsd.org/archives/dev-commits-doc-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-doc-all@freebsd.org Sender: owner-dev-commits-doc-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fernape X-Git-Repository: doc X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0d4fa21eab62ef797e1a93d0203e474d1d7c8088 Auto-Submitted: auto-generated The branch main has been updated by fernape: URL: https://cgit.FreeBSD.org/doc/commit/?id=0d4fa21eab62ef797e1a93d0203e474d1d7c8088 commit 0d4fa21eab62ef797e1a93d0203e474d1d7c8088 Author: Fernando ApesteguĂ­a AuthorDate: 2024-08-29 16:59:19 +0000 Commit: Fernando ApesteguĂ­a CommitDate: 2024-09-07 18:11:20 +0000 [fdp-primer]: Clarify link macros usage Put some order in what macros to use when. Follow-up for e6e9a81269 Differential Revision: https://reviews.freebsd.org/D46481 --- .../fdp-primer/asciidoctor-primer/_index.adoc | 39 +++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/documentation/content/en/books/fdp-primer/asciidoctor-primer/_index.adoc b/documentation/content/en/books/fdp-primer/asciidoctor-primer/_index.adoc index 55ebe5b6dd..12b3f4421f 100644 --- a/documentation/content/en/books/fdp-primer/asciidoctor-primer/_index.adoc +++ b/documentation/content/en/books/fdp-primer/asciidoctor-primer/_index.adoc @@ -219,7 +219,7 @@ However, it is a good practice to do this anyway to ensure that Asciidoctor rend ==== [[asciidoctor-links-internal]] -=== Internal link +=== Links to another book or article To point to another book or article the Asciidoctor variables should be used. For example, if we are in the `cups` article and we want to point to `ipsec-must` these steps should be used. @@ -240,6 +240,43 @@ And this would be rendered as. + extref:{ipsec-must}[IPSec-Must article] +[NOTE] +==== +The `extref` macro is defined as an extension. +It is designed to render the correct link across the different outputs +==== + +=== Links to the same file or to another file in the same book + +Books are structured in different directories to keep a sane layout. +To create a link from one subdirectory of a book to another subdirectory of the +same book, use the `crossref` macro: +.... +crossref:doc-build[documentation-makefile] +.... +And this would be rendered as + +crossref:doc-build[documentation-makefile, This link] + +[NOTE] +==== +The `crossref` macro is defined as an extension. +It is designed to render the correct link across the different outputs +==== + +[NOTE] +==== +Use the `crossref` macro for intra-document links too. +Although it might be inconvenient to write the name of the current document, +it ensures the correct link is renderedacross the different outputs +==== + +[WARNING] +==== +Do not use neither the `xref` macro nor its shortcut `<<` `>>`. +They do not work well in all output formats. +==== + [[asciidoctor-images-icons]] == Images and Icons