From 6631b20cfbffb0afd7fea96c1f1dd4c22c1ca003 Mon Sep 17 00:00:00 2001 From: Jason Boxman Date: Tue, 27 Apr 2021 22:34:25 -0400 Subject: [PATCH] The problem with relative xref, illustrated --- _topic_map.yml | 11 +++++++++++ modules/ref.adoc | 5 +++++ modules/refme.adoc | 4 ++++ refs/a.adoc | 4 ++++ refs/two/b.adoc | 4 ++++ 5 files changed, 28 insertions(+) create mode 100644 modules/ref.adoc create mode 100644 modules/refme.adoc create mode 100644 refs/a.adoc create mode 100644 refs/two/b.adoc diff --git a/_topic_map.yml b/_topic_map.yml index 5d35a8eb7d69..935f2b21ab17 100644 --- a/_topic_map.yml +++ b/_topic_map.yml @@ -21,6 +21,17 @@ # The ordering of the records in this document determines the ordering of the # topic groups and topics on the main page. +--- +Name: Test +Dir: refs +Topics: +- Name: a + File: a +- Name: two + Dir: two + Topics: + - Name: b + File: b --- Name: About Dir: welcome diff --git a/modules/ref.adoc b/modules/ref.adoc new file mode 100644 index 000000000000..fe72ddb53fa4 --- /dev/null +++ b/modules/ref.adoc @@ -0,0 +1,5 @@ += Another module + +With content. + +* xref:../a.adoc#hello[Try] diff --git a/modules/refme.adoc b/modules/refme.adoc new file mode 100644 index 000000000000..3ab9cbd58c3e --- /dev/null +++ b/modules/refme.adoc @@ -0,0 +1,4 @@ +[id="hello"] += A module link target + +With content. diff --git a/refs/a.adoc b/refs/a.adoc new file mode 100644 index 000000000000..7313f96ee0c4 --- /dev/null +++ b/refs/a.adoc @@ -0,0 +1,4 @@ += A + +include::modules/ref.adoc[leveloffset=+1] +include::modules/refme.adoc[leveloffset=+1] diff --git a/refs/two/b.adoc b/refs/two/b.adoc new file mode 100644 index 000000000000..6b899186b6df --- /dev/null +++ b/refs/two/b.adoc @@ -0,0 +1,4 @@ += B + +include::modules/ref.adoc[leveloffset=+1] +include::modules/refme.adoc[leveloffset=+1]