mirror of
https://github.com/NixOS/nix
synced 2025-06-24 22:11:15 +02:00
doc: Render verbatim @docroot@ on contributing page
In rendered form: ```diff -Add references to the manual using .. +Add references to the manual using [links like this](@docroot@/example.md) ```
This commit is contained in:
parent
c3e7e88889
commit
147a34c573
2 changed files with 5 additions and 1 deletions
|
@ -20,8 +20,9 @@ prs: 1238
|
||||||
Here's one or more paragraphs that describe the change.
|
Here's one or more paragraphs that describe the change.
|
||||||
|
|
||||||
- It's markdown
|
- 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.
|
Significant changes should add the following header, which moves them to the top.
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,9 @@ def recursive_replace(data: dict[str, t.Any], book_root: Path, search_path: Path
|
||||||
).replace(
|
).replace(
|
||||||
'@docroot@',
|
'@docroot@',
|
||||||
("../" * len(path_to_chapter.parent.parts) or "./")[:-1]
|
("../" * len(path_to_chapter.parent.parts) or "./")[:-1]
|
||||||
|
).replace(
|
||||||
|
'@_at_',
|
||||||
|
'@'
|
||||||
),
|
),
|
||||||
sub_items = [
|
sub_items = [
|
||||||
recursive_replace(sub_item, book_root, search_path)
|
recursive_replace(sub_item, book_root, search_path)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue