Skip to content

Instantly share code, notes, and snippets.

@bergerhoffer
Created October 17, 2023 21:27
Show Gist options
  • Save bergerhoffer/a6b8ff4ece7c90ca9105e2ed447142cb to your computer and use it in GitHub Desktop.
Save bergerhoffer/a6b8ff4ece7c90ca9105e2ed447142cb to your computer and use it in GitHub Desktop.
=== Links to internal content
If you want to link to other assemblies or modules in the repository, use the following format:
----
xref:../<dir>/<assembly_name>.adoc#<anchor_id>[<section_title>]
----
Note the following guidelines:
* You must use the `.adoc` extension.
* You must specify an anchor ID.
* You must back up the appropriate number of levels (`../`, `../../`, and so on) to get back to the top-level `openshift-docs/` repository, and then specify the subdirectories to get back down to the assembly.
For example, if you have the following directory structure:
....
openshift-docs/
openshift-docs/foo
openshift-docs/foo/bar.adoc
openshift-docs/baz
openshift-docs/baz/zig.adoc
....
And you are working in `bar.adoc` and want to link to `zig.adoc`, use the following xref:
----
For more information, see the xref:../baz/zig.adoc#baz-zig[ZIG manual].
----
where `baz-zig` is the anchor ID.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment