aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2023-01-03 10:09:08 +0100
committerRobert Hensing <robert@roberthensing.nl>2023-01-10 22:30:41 +0100
commit34a1e0d29b55ff4f3fc7c923a3f03a65c3ff79a3 (patch)
treecc7f8113c881e632ec651a8310c3b566fd89a79d /src
parentbe10c09d2350019bbf4075c5e22ddb1f97d3dad0 (diff)
doc/manual: Introduce @docroot@ as a stable base for includable snippets
This way the links are clearly within the manual (ie not absolute paths), while allowing snippets to reference the documentation root reliably, regardless of at which base url they're included.
Diffstat (limited to 'src')
-rw-r--r--src/libcmd/common-eval-args.cc4
-rw-r--r--src/libexpr/primops.cc2
-rw-r--r--src/libstore/globals.hh2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/libcmd/common-eval-args.cc b/src/libcmd/common-eval-args.cc
index 0e321e5e4..908127b4d 100644
--- a/src/libcmd/common-eval-args.cc
+++ b/src/libcmd/common-eval-args.cc
@@ -34,8 +34,8 @@ MixEvalArgs::MixEvalArgs()
.shortName = 'I',
.description = R"(
Add *path* to the Nix search path. The Nix search path is
- initialized from the colon-separated [`NIX_PATH`](./env-common.md#env-NIX_PATH) environment
- variable, and is used to look up the location of Nix expressions using [paths](../language/values.md#type-path) enclosed in angle
+ initialized from the colon-separated [`NIX_PATH`](@docroot@/command-ref/env-common.md#env-NIX_PATH) environment
+ variable, and is used to look up the location of Nix expressions using [paths](@docroot@/language/values.md#type-path) enclosed in angle
brackets (i.e., `<nixpkgs>`).
For instance, passing
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index 9ef91cbc5..5519642b1 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -1917,7 +1917,7 @@ static RegisterPrimOp primop_toFile({
```
Note that `${configFile}` is a
- [string interpolation](language/values.md#type-string), so the result of the
+ [string interpolation](@docroot@/language/values.md#type-string), so the result of the
expression `configFile`
(i.e., a path like `/nix/store/m7p7jfny445k...-foo.conf`) will be
spliced into the resulting string.
diff --git a/src/libstore/globals.hh b/src/libstore/globals.hh
index f026c8808..7111def92 100644
--- a/src/libstore/globals.hh
+++ b/src/libstore/globals.hh
@@ -676,7 +676,7 @@ public:
- the store object is signed by one of the [`trusted-public-keys`](#conf-trusted-public-keys)
- the substituter is in the [`trusted-substituters`](#conf-trusted-substituters) list
- the [`require-sigs`](#conf-require-sigs) option has been set to `false`
- - the store object is [output-addressed](glossary.md#gloss-output-addressed-store-object)
+ - the store object is [output-addressed](@docroot@/glossary.md#gloss-output-addressed-store-object)
)",
{"binary-caches"}};