1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-14 13:01:05 +01:00

Merge pull request #13583 from NixOS/mergify/bp/2.28-maintenance/pr-13221

doc: Render verbatim `@docroot@` on contributing page (backport #13221)
This commit is contained in:
mergify[bot] 2025-07-30 19:29:42 +00:00 committed by GitHub
commit 3fe1b42423
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View file

@ -20,8 +20,9 @@ prs: 1238
Here's one or more paragraphs that describe the change.
- It's markdown
- Add references to the manual using @docroot@
- Add references to the manual using [links like this](@_at_docroot@/example.md)
```
<!-- for the raw markdown readers: that means using @docroot@ -->
Significant changes should add the following header, which moves them to the top.

View file

@ -57,6 +57,9 @@ def recursive_replace(data: dict[str, t.Any], book_root: Path, search_path: Path
).replace(
'@docroot@',
("../" * len(path_to_chapter.parent.parts) or "./")[:-1]
).replace(
'@_at_',
'@'
),
sub_items = [
recursive_replace(sub_item, book_root, search_path)