Configuration¶
- nix_linkcode_resolve¶
- Type:
Callable[[str], str] | None
- Default:
None
A function that maps a
:declaration:
to an URL.For example, to map any store path to a single GitHub repository:
conf.py
— setnix_linkcode_resolve
¶source_repository = "https://github.com/user/repo" def nix_linkcode_resolve(path: str) -> str: # Strip the nix store and package relative_path = "/".join(Path(path).parts[4:]) return f"{source_repository}/blob/{revision}/{relative_path}"
If set, this uses the
sphinx.ext.linkcode
mechanism to add a[source]
link next to the object.If
None
(the default), the declaration path is put as-is in the content of the object.
- nix_toc_display_full_path¶
- Type:
bool
- Default:
True
Whether to show full names in the table of contents.